Class OpeningBook
- java.lang.Object
-
- org.swtpra1.alphabetaplayer.openingbook.OpeningBook
-
public class OpeningBook extends java.lang.Object
manages an opening book for the game of amazons
-
-
Constructor Summary
Constructors Constructor Description OpeningBook(TreeNode<ValuedTurn> book)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description OpeningBook
copy()
boolean
isActive()
void
makeMove(Turn turn)
updates the state of the opening bookTurn
nextTurn()
-
-
-
Constructor Detail
-
OpeningBook
public OpeningBook(TreeNode<ValuedTurn> book)
-
-
Method Detail
-
copy
public OpeningBook copy()
- Returns:
- a new opening book that can be used to make moves without affecting the state of this opening book
-
isActive
public boolean isActive()
- Returns:
- next turn is in opening book
-
makeMove
public void makeMove(Turn turn)
updates the state of the opening book- Parameters:
turn
- which turn was made
-
nextTurn
public Turn nextTurn()
- Returns:
- best next turn from opening book
-
-