|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectknockabout.Player
Standard KnockAbout Player Class Provides a set of functions that an agent should inherit (i.e. Your AIPlayer class should be a subclass of this one)
Field Summary | |
static int |
BLACK
|
static int |
DRAW
|
static int |
NOCOLOR
|
static int |
YELLOW
|
Method Summary | |
abstract Move |
chooseMove(Board board)
|
int |
getMyColor()
|
java.lang.String |
getMyName()
|
static int |
opponentColor(int color)
Utility method that return the opponent's color given your color |
void |
setMyColor(int _color)
Sets an agent's color |
void |
setMyName(java.lang.String _name)
Sets an agent's name |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int BLACK
public static final int YELLOW
public static final int DRAW
public static final int NOCOLOR
Method Detail |
public static int opponentColor(int color)
public void setMyName(java.lang.String _name)
public void setMyColor(int _color)
public int getMyColor()
public java.lang.String getMyName()
public abstract Move chooseMove(Board board)
board
- The current board position
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |