Skip navigation links
G H N P T 

G

getPlayer() - Method in class HexState
Return the current player constant PLAYER1 or PLAYER2.
getPosition(int, int) - Method in class HexState
Return the contents of a board row and column (upper-left diagonal) position using integer constants PLAYER1/PLAYER2/NONE.
getPosition(String) - Method in class HexState
Return the contents of a board row and column (upper-left diagonal) position using integer constants PLAYER1/PLAYER2/NONE.
getSize() - Method in class HexState
Return the number of rows and columns (i.e.
getWinner() - Method in class HexState
Return the winner PLAYER1/PLAYER2 if there is a winner, or NONE is there is no winner.

H

HexState - Class in <Unnamed>
 
HexState(int) - Constructor for class HexState
Create an empty Hex board that has the given number of rows and upper-left diagonals for hex grid positions.
HexState(HexState) - Constructor for class HexState
Create a deep copy of the given Hex game state (including current player).

N

NONE - Static variable in class HexState
 

P

playAt(int, int) - Method in class HexState
Attempt to make a legal play for the current player at the given position and then change the player and return true.
playAt(String) - Method in class HexState
Attempt to make a legal play for the current player at the given position and then change the player and return true.
PLAYER1 - Static variable in class HexState
 
PLAYER2 - Static variable in class HexState
 

T

toString() - Method in class HexState
Return a String representation of the board according to the following specification: There should be one line per board row, one line with column letter labels, and one final line terminated with a newline that describes the current player/winner.
G H N P T 
Skip navigation links