You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
525 B
27 lines
525 B
11 months ago
|
|
||
|
public class GameState {
|
||
|
//Tracks the game board as a 1D array of Square objects (effectively 12 x 12) with 2 layers of sentinel squares all around.
|
||
|
//Knows whose turn it is
|
||
|
|
||
|
public GameState() {
|
||
|
|
||
|
reset();
|
||
|
}
|
||
|
|
||
|
public void reset() {
|
||
|
}
|
||
|
|
||
|
public void attemptMove(int sourceX, int sourceY, int destX, int destY) {
|
||
|
//See if it is legal.
|
||
|
//Change the board state accordingly.
|
||
|
}
|
||
|
|
||
|
public Moves[] getAllPossibleMoves() {
|
||
|
}
|
||
|
|
||
|
// returns something like "checkmate", "stalemate", etc.
|
||
|
public String getFeedback() {
|
||
|
}
|
||
|
|
||
|
}
|