Package threeChess
Class CheatBoard
- java.lang.Object
-
- threeChess.Board
-
- threeChess.CheatBoard
-
- All Implemented Interfaces:
java.lang.Cloneable
public class CheatBoard extends Board implements java.lang.Cloneable
Main class for representing game state. The board maps each position to the piece at that posiiton, or null is free. It also records previous moves, as well as whose move it is, and which pieces have been captured by which player. CheatBoard overrides the isLegalMove function to always return true, so any Board position can be used.
-
-
Constructor Summary
Constructors Constructor Description CheatBoard()
Creates a standard board
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isLegalMove(Position start, Position end)
All moves are deemed legal-
Methods inherited from class threeChess.Board
clone, gameOver, getCaptured, getLoser, getMove, getMoveCount, getPiece, getPositions, getTimeLeft, getTurn, getWinner, move, move, score, step
-
-
-
-
Method Detail
-
isLegalMove
public boolean isLegalMove(Position start, Position end)
All moves are deemed legal- Overrides:
isLegalMove
in classBoard
- Parameters:
start
- the starting position of the pieceend
- the end position the piece intends to move to- Returns:
- true
-
-