|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectru.ifmo.knim.main.MoveResult
Class represents move result
Field Summary | |
boolean |
isGameOver
Is the game finished |
int |
nTaken
The amount of stones that were taken |
int |
takenFrom
Line from which the stones were taken |
int |
winner
Winner index |
static int |
WINNER_COMPUTER
Computer is the winner |
static int |
WINNER_NOBODY
Nobody is the winner on current move |
static int |
WINNER_PLAYER
Player is the winner |
Constructor Summary | |
MoveResult()
Default constructor of class |
Method Summary | |
static MoveResult |
getMoveResult(int[] move)
Performs array to structure result conversion |
void |
setGameOver(boolean b)
Say that the game is over or not |
void |
setWinner(int id)
Set id of a winner |
void |
take(int takeFrom,
int nTaken)
Take stones |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public boolean isGameOver
public int winner
public int takenFrom
public int nTaken
public static final int WINNER_NOBODY
public static final int WINNER_COMPUTER
public static final int WINNER_PLAYER
Constructor Detail |
public MoveResult()
Method Detail |
public void setGameOver(boolean b)
b
- - flagpublic void setWinner(int id)
id
- - winnerpublic void take(int takeFrom, int nTaken)
takeFrom
- - where to takenTaken
- - how much to takepublic static MoveResult getMoveResult(int[] move)
move
- the array of amount of stones in lines
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |