Skip to content

Commit

Permalink
handle substate with LevelTrait
Browse files Browse the repository at this point in the history
  • Loading branch information
dubzn committed Nov 4, 2024
1 parent c53b18e commit 0414a27
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/systems/game_system.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ mod game_system {
assert(game.state == GameState::IN_GAME, errors::GAME_NOT_IN_GAME);
assert(game.substate == GameSubState::CREATE_LEVEL, errors::WRONG_SUBSTATE_CREATE_LEVEL);

game.substate = GameSubState::BEAST;
game.substate = LevelTrait::calculate(world, game_id);
match game.substate {
GameSubState::BEAST => { BeastTrait::create(world, ref store, game_id); },
GameSubState::OBSTACLE => { ChallengeTrait::create(world, ref store, game_id); },
Expand Down

0 comments on commit 0414a27

Please sign in to comment.