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(
131
131
result = 31 * result + (lastMove?.hashCode() ? : 0 )
132
132
result = 31 * result + board.hashCode()
133
133
result = 31 * result + undeployedPieceShapes.hashCode()
134
- result = 31 * result + deployedPieces.hashCode()
135
134
result = 31 * result + currentTeam.hashCode()
136
135
result = 31 * result + turn
137
136
return result
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ object GameRuleLogic {
39
39
gameState.board[it] = + move.color
40
40
}
41
41
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)
43
43
44
44
// If it was the last piece for this color, remove him from the turn queue
45
45
if (gameState.undeployedPieceShapes.getValue(move.color).isEmpty()) {
@@ -80,7 +80,7 @@ object GameRuleLogic {
80
80
if (bordersOnColor(gameState.board, it, move.color))
81
81
throw InvalidMoveException (" Field $it already borders on ${move.color} " , move)
82
82
}
83
- if (gameState.deployedPieces[ move.color] .isNullOrEmpty()) {
83
+ if (gameState.deployedPieces?.getValue( move.color) .isNullOrEmpty()) {
84
84
// Check if it's the requested shape
85
85
if (move.piece.kind != gameState.startPiece)
86
86
throw InvalidMoveException (" Expected the predetermined staring piece, ${gameState.startPiece} " , move)
You can’t perform that action at this time.
0 commit comments