Skip to content

Commit

Permalink
Bug related to castling fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Cap. Hindsight committed Mar 1, 2017
1 parent c62923b commit 0cec226
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Kernel/Chess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -549,10 +549,10 @@ public bool CheckCastleMoveApplicable(CastleMove move) {
this[4, c] == new Piece(move.ActorPlayer, PieceType.King);

case CastleType.Right: return
this[4, 0] == new Piece(move.ActorPlayer, PieceType.King) &&
this[5, 0] == null &&
this[6, 0] == null &&
this[7, 0] == new Piece(move.ActorPlayer, PieceType.Rook);
this[4, c] == new Piece(move.ActorPlayer, PieceType.King) &&
this[5, c] == null &&
this[6, c] == null &&
this[7, c] == new Piece(move.ActorPlayer, PieceType.Rook);

default:
throw new AssertionException($"Unsupported castle type: {move.CastleType}");
Expand Down

0 comments on commit 0cec226

Please sign in to comment.