working castling on console + app to play either mode
This commit is contained in:
31
app/src/main/java/chess/simulator/CastlingTest.java
Normal file
31
app/src/main/java/chess/simulator/CastlingTest.java
Normal file
@@ -0,0 +1,31 @@
|
||||
package chess.simulator;
|
||||
|
||||
import chess.controller.CommandExecutor;
|
||||
import chess.model.Coordinate;
|
||||
import chess.model.Move;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
public class CastlingTest extends Simulator {
|
||||
public CastlingTest(CommandExecutor commandExecutor) {
|
||||
super(commandExecutor);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected List<Move> getMoves() {
|
||||
return Arrays.asList(
|
||||
// white pawn
|
||||
new Move(new Coordinate(6, 6), new Coordinate(6, 4)),
|
||||
// black knight
|
||||
new Move(new Coordinate(1, 0), new Coordinate(0, 2)),
|
||||
// white bishop
|
||||
new Move(new Coordinate(5, 7), new Coordinate(7, 5)),
|
||||
// black pawn
|
||||
new Move(new Coordinate(1, 1), new Coordinate(1, 2)),
|
||||
// white knight
|
||||
new Move(new Coordinate(6, 7), new Coordinate(5, 5)),
|
||||
// black pawn, bis
|
||||
new Move(new Coordinate(2, 1), new Coordinate(2, 2)));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user