Skip to content

Commit

Permalink
Merge pull request #39 from Chia-Network/20241016-fix-demo
Browse files Browse the repository at this point in the history
Fix up old demo
  • Loading branch information
prozacchiwawa authored Oct 16, 2024
2 parents 5b60210 + fa627c6 commit e5e63ad
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ jobs:
components: rustfmt, clippy
- name: cargo test
run: |
python -m pip install chia-blockchain
python -m pip install chia-blockchain==2.3.0
# Try tests without sim-tests to ensure we're tracking build failures in that
# configuration. Also it's a lot shorter.
cargo test
Expand Down
14 changes: 12 additions & 2 deletions src/cmd/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,24 @@ impl ToLocalUI for UIReceiver {
Ok(())
}

fn opponent_moved(&mut self, _id: &GameID, readable: ReadableMove) -> Result<(), Error> {
fn opponent_moved(
&mut self,
_allocator: &mut AllocEncoder,
_id: &GameID,
readable: ReadableMove,
) -> Result<(), Error> {
self.received_moves += 1;
self.our_readable_move = Vec::default();
self.opponent_readable_move = readable;
Ok(())
}

fn game_message(&mut self, _id: &GameID, readable: ReadableMove) -> Result<(), Error> {
fn game_message(
&mut self,
_allocator: &mut AllocEncoder,
_id: &GameID,
readable: ReadableMove,
) -> Result<(), Error> {
self.remote_message = readable;
Ok(())
}
Expand Down

0 comments on commit e5e63ad

Please sign in to comment.