Constructor and Description |
---|
Game(GameTree tree) |
Game(int boardSize) |
Game(int boardSize,
Komi komi,
ConstPointList handicap,
java.lang.String rules,
TimeSettings timeSettings) |
Modifier and Type | Method and Description |
---|---|
void |
addMarked(GoPoint point,
MarkType type)
Add a mark property to current node.
|
void |
clearModified()
Clear modified flag.
|
void |
createNewChild()
Append new empty node and make it current node.
|
ConstBoard |
getBoard() |
ConstClock |
getClock() |
ConstNode |
getClockNode()
Return last node when startClock() was called.
|
ConstNode |
getCurrentNode() |
ConstGameInfo |
getGameInfo(ConstNode node) |
ConstNode |
getGameInfoNode() |
ConstNode |
getGameInfoNode(ConstNode node) |
int |
getMoveNumber() |
ConstNode |
getRoot() |
int |
getSize() |
GoColor |
getToMove() |
ConstGameTree |
getTree() |
void |
gotoNode(ConstNode node) |
void |
haltClock() |
void |
init(GameTree tree) |
void |
init(int boardSize,
Komi komi,
ConstPointList handicap,
java.lang.String rules,
TimeSettings timeSettings) |
boolean |
isModified()
Check if game was modified.
|
void |
keepOnlyMainVariation() |
void |
keepOnlyPosition() |
void |
makeMainVariation()
Make current node the main variation.
|
void |
play(Move move) |
void |
removeMarked(GoPoint point,
MarkType type)
Remove a mark property from current node.
|
void |
resetClock() |
void |
restoreClock() |
void |
resumeClock() |
void |
setClockListener(Clock.Listener listener)
Set clock listener.
|
void |
setComment(java.lang.String comment)
Set comment in current node.
|
void |
setComment(java.lang.String comment,
ConstNode node) |
void |
setGameInfo(ConstGameInfo info,
ConstNode node) |
void |
setKomi(Komi komi) |
void |
setLabel(GoPoint point,
java.lang.String value)
Set label in current node.
|
void |
setMovesLeft(ConstNode node,
GoColor c,
int moves) |
void |
setMovesLeft(GoColor c,
int moves) |
void |
setPlayer(GoColor c,
java.lang.String name) |
void |
setResult(java.lang.String result) |
void |
setTimeLeft(ConstNode node,
GoColor c,
double seconds) |
void |
setTimeLeft(GoColor c,
double seconds) |
void |
setTimeSettings(TimeSettings timeSettings)
Change the time settings.
|
void |
setToMove(GoColor color) |
void |
setup(GoPoint p,
GoColor c)
Set a stone on the board or remove a stone.
|
void |
startClock() |
void |
truncate()
Truncate current node and subtree.
|
void |
truncateChildren()
Remove children of currentNode.
|
public Game(int boardSize)
public Game(int boardSize, Komi komi, ConstPointList handicap, java.lang.String rules, TimeSettings timeSettings)
public Game(GameTree tree)
public void clearModified()
isModified()
public void createNewChild()
public ConstBoard getBoard()
public ConstClock getClock()
public ConstNode getCurrentNode()
getCurrentNode
in interface ConstGame
public ConstGameInfo getGameInfo(ConstNode node)
getGameInfo
in interface ConstGame
public ConstNode getGameInfoNode()
getGameInfoNode
in interface ConstGame
public int getMoveNumber()
getMoveNumber
in interface ConstGame
public ConstGameTree getTree()
public void gotoNode(ConstNode node)
public void haltClock()
public ConstNode getClockNode()
public final void init(int boardSize, Komi komi, ConstPointList handicap, java.lang.String rules, TimeSettings timeSettings)
public final void init(GameTree tree)
public boolean isModified()
isModified
in interface ConstGame
public void keepOnlyMainVariation()
public void keepOnlyPosition()
public void makeMainVariation()
public void play(Move move)
public void removeMarked(GoPoint point, MarkType type)
public void resetClock()
public void restoreClock()
public void resumeClock()
public void setClockListener(Clock.Listener listener)
public void setComment(java.lang.String comment)
public void setComment(java.lang.String comment, ConstNode node)
public void setGameInfo(ConstGameInfo info, ConstNode node)
public void setKomi(Komi komi)
public void setLabel(GoPoint point, java.lang.String value)
public void setPlayer(GoColor c, java.lang.String name)
public void setResult(java.lang.String result)
public void setToMove(GoColor color)
public void setTimeSettings(TimeSettings timeSettings)
public void setTimeLeft(GoColor c, double seconds)
public void setMovesLeft(GoColor c, int moves)
public void setup(GoPoint p, GoColor c)
p
- The location.c
- The color of the stone (EMPTY for removal).public void startClock()
public void truncate()
public void truncateChildren()