File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
plugin/src/shared/sc/plugin2021 Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,6 @@ class GameState @JvmOverloads constructor(
131131 result = 31 * result + (lastMove?.hashCode() ? : 0 )
132132 result = 31 * result + board.hashCode()
133133 result = 31 * result + undeployedPieceShapes.hashCode()
134- result = 31 * result + deployedPieces.hashCode()
135134 result = 31 * result + currentTeam.hashCode()
136135 result = 31 * result + turn
137136 return result
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ object GameRuleLogic {
3939 gameState.board[it] = + move.color
4040 }
4141 gameState.undeployedPieceShapes.getValue(move.color).remove(move.piece.kind)
42- gameState.deployedPieces.getValue(move.color).add(move.piece)
42+ gameState.deployedPieces? .getValue(move.color).add(move.piece)
4343
4444 // If it was the last piece for this color, remove him from the turn queue
4545 if (gameState.undeployedPieceShapes.getValue(move.color).isEmpty()) {
@@ -80,7 +80,7 @@ object GameRuleLogic {
8080 if (bordersOnColor(gameState.board, it, move.color))
8181 throw InvalidMoveException (" Field $it already borders on ${move.color} " , move)
8282 }
83- if (gameState.deployedPieces[ move.color] .isNullOrEmpty()) {
83+ if (gameState.deployedPieces?.getValue( move.color) .isNullOrEmpty()) {
8484 // Check if it's the requested shape
8585 if (move.piece.kind != gameState.startPiece)
8686 throw InvalidMoveException (" Expected the predetermined staring piece, ${gameState.startPiece} " , move)
You can’t perform that action at this time.
0 commit comments