Movement restriction for Knight

This commit is contained in:
jylkyle 2023-02-18 20:49:19 -08:00
parent 6f51247019
commit b5dc5a4228

View file

@ -15,6 +15,7 @@ public class Knight extends Piece {
possibleMoves.add(new BoardCoordinate(position.x + 1, position.y + 2)); possibleMoves.add(new BoardCoordinate(position.x + 1, position.y + 2));
possibleMoves.add(new BoardCoordinate(position.x - 1, position.y + 2)); possibleMoves.add(new BoardCoordinate(position.x - 1, position.y + 2));
possibleMoves.add(new BoardCoordinate(position.x - 2, position.y + 1)); possibleMoves.add(new BoardCoordinate(position.x - 2, position.y + 1));
// test
return possibleMoves; return possibleMoves;
} }
} }