Skip to content

Commit 89da3e1

Browse files
committed
style(plugin): corrected error message
1 parent 2334d42 commit 89da3e1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugin/src/shared/sc/plugin2021/util/GameRuleLogic.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ object GameRuleLogic {
7575
throw InvalidMoveException("Field $it already borders on ${move.color}", move)
7676
}
7777
if (gameState.deployedPieces[move.color].isNullOrEmpty()) {
78+
// Check if it's the requested shape
7879
if (move.piece.kind != gameState.startPiece)
7980
throw InvalidMoveException("Expected the predetermined staring piece, ${gameState.startPiece}", move)
8081
// Check if it is placed correctly in a corner
8182
if (move.piece.coordinates.none { isOnCorner(it)})
82-
// TODO: Add expected move to exception
83-
throw InvalidMoveException("Expected the pentomino declaed as first piece", move)
83+
throw InvalidMoveException("The Piece isn't located in a corner", move)
8484
} else {
8585
// Check if the piece is connected to at least one tile of same color by corner
8686
if (move.piece.coordinates.none { cornersOnColor(gameState.board, it, move.color) })

0 commit comments

Comments
 (0)