Package student.micro.battleship
Class TestableGameState
java.lang.Object
student.micro.battleship.GameState
student.micro.battleship.TestableGameState
A special subclass of
GameState
that adds extra features useful
in writing test cases.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet my board from the game state.Get my opponent's board from the game state.
-
Constructor Details
-
TestableGameState
public TestableGameState()Create a new game state, with two empty boards.
-
-
Method Details
-
getMyBoard
Get my board from the game state.- Overrides:
getMyBoard
in classGameState
- Returns:
- My board.
-
getOpponentsBoard
Get my opponent's board from the game state.- Overrides:
getOpponentsBoard
in classGameState
- Returns:
- My opponent's board.
-