Package | Description |
---|---|
clui |
This package contains the command-line user interface.
|
controller |
This package contains various controllers, which are strategies to select
the next move for a given player.
|
model |
this package contains all of the data structures used to model the
state of the five-in-a-row game, and for processing the rules of the game.
|
Modifier and Type | Method and Description |
---|---|
static void |
BoardPrinter.printBoard(Board b)
Print the board.
|
Modifier and Type | Method and Description |
---|---|
int |
SmartAI.estimate(Board b)
A particular line of 5 adjacent cells is "winnable" for player p if
it does not contain any of the opponent's marks.
|
java.lang.Iterable<Location> |
SmartAI.moves(Board b)
Return the set of locations that are adjacent to played locations, or
the center of the board if no moves have been played.
|
boolean |
SmartAI.reasonableMove(Board b,
Location loc)
Returns true iff loc is empty and has a neighbor.
|
int |
SmartAI.score(Board b,
Player p)
return the positive score for player p
|
int |
SmartAI.score(Board b,
Player p,
Line s)
Return the score for player p, for the line s.
|
Modifier and Type | Field and Description |
---|---|
static @NonNull Board |
Board.EMPTY
The empty board.
|
Modifier and Type | Method and Description |
---|---|
Board |
Game.getBoard() |
Board |
Board.update(@NonNull Player p,
@NonNull Location loc)
Return a new board that is the same as this with loc mapped to p.
|