Skip to content

Commit

Permalink
check for limit and reveal phase, also when withdrawing land
Browse files Browse the repository at this point in the history
  • Loading branch information
wighawag committed Apr 28, 2024
1 parent 571b57b commit 7b77f6e
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions web/src/lib/ui/landmenu/LandMenu.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,14 @@
if (!$landmenu) {
throw new Error('No menu');
}
if (!$epochState.isActionPhase) {
info.setRevealPhase();
return;
}
if ($offchainState.moves?.list.length >= 30) {
info.setMaxMovesReached();
return;
}
accountData.addMove({x: $landmenu.x, y: $landmenu.y, color: Color.None, player}, $epochState.epoch);
landmenu.set(undefined);
}
Expand Down

0 comments on commit 7b77f6e

Please sign in to comment.