Skip to content

Commit

Permalink
chore: add move limit
Browse files Browse the repository at this point in the history
  • Loading branch information
lewis committed Oct 26, 2023
1 parent 84d1395 commit 0271f50
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/contracts/src/systems/BattleSystem.sol
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ contract BattleSystem is System {
// console.log("reveal battle");
revealWinner(_battleId);
}
emit BattleReveal(_battleId, _msgSender());
// emit BattleReveal(_battleId, _msgSender());
}

function revealWinner(uint256 _battleId) public {
Expand Down
2 changes: 1 addition & 1 deletion packages/contracts/src/systems/MoveSystem.sol
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ contract MoveSystem is System {
moveList.length > 0 && moveList.length <= BattleConfig.getMaxMoveDistance(BATTLE_CONFIG_KEY),
"invalid move distance"
);
// require(moveList.length <= Player.getSpeed(_msgSender()), "exceed player speed");
require(moveList.length <= Player.getSpeed(_msgSender()), "exceed player speed");
// check player lock
require(PlayerLocationLock.get(_msgSender()) == 0, "You are locked");
// check continuity
Expand Down

0 comments on commit 0271f50

Please sign in to comment.