Package | Description |
---|---|
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 |
---|---|
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.
|
Modifier and Type | Method and Description |
---|---|
boolean |
SmartAI.reasonableMove(Board b,
Location loc)
Returns true iff loc is empty and has a neighbor.
|
Modifier and Type | Method and Description |
---|---|
java.util.Iterator<Location> |
Line.iterator()
Iterate over the locations in this line
|
Modifier and Type | Method and Description |
---|---|
Player |
Board.get(@NonNull Location loc)
Return the player who has played in loc, or null if loc is empty.
|
void |
Game.submitMove(@NonNull Player p,
@NonNull Location loc)
Update the game in response to player p playing in location loc.
|
Board |
Board.update(@NonNull Player p,
@NonNull Location loc)
Return a new board that is the same as this with loc mapped to p.
|