From 5e3d77b0ae0fa602c43a77777739838e0497fd68 Mon Sep 17 00:00:00 2001 From: Ibrahim Suleiman Date: Thu, 6 Feb 2025 11:23:36 +0100 Subject: [PATCH] chore: update model after state changes in function --- onchain/src/systems/game_actions.cairo | 3 +++ 1 file changed, 3 insertions(+) diff --git a/onchain/src/systems/game_actions.cairo b/onchain/src/systems/game_actions.cairo index 9cf85ba..e4f2750 100644 --- a/onchain/src/systems/game_actions.cairo +++ b/onchain/src/systems/game_actions.cairo @@ -260,6 +260,9 @@ pub mod GameActions { }, _ => panic!("Invalid number of players"), }; + + // Update the game state in the world + world.write_model(@game); } fn move(ref self: ContractState, pos: felt252, color: u8) {