Skip to content

Commit

Permalink
fix: re init err
Browse files Browse the repository at this point in the history
  • Loading branch information
noyyyy committed Oct 18, 2024
1 parent 9a2458b commit 7d8ce8a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/contracts/src/home.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -717,11 +717,14 @@ mod home {
// TODO: set as real args

fn initialize(world: IWorldDispatcher) {

let mut gState = get!(world, 1, GlobalState);

set!(
world,
GlobalState {
index: 1,
totalMatch: 0,
totalMatch: if gState.totalMatch > 0 { gState.totalMatch } else { 0 },
totalCreature: 26,
totalR1Creature: 10,
totalR2Creature: 10,
Expand Down

0 comments on commit 7d8ce8a

Please sign in to comment.