|
Othello 1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.drexel.cs.ai.othello.ConsoleUserInterface
public class ConsoleUserInterface
A text-based user interface that allows for execution in a headless environment.
| Constructor Summary | |
|---|---|
ConsoleUserInterface()
|
|
| Method Summary | |
|---|---|
OthelloPlayer[] |
getPlayers()
Prints all classes that are instanceof
OthelloPlayer that have been found in the
classpath and then calls System.exit(1). |
void |
handleStateUpdate(GameState newState)
Callback function for receiving updates to the state of the game. |
void |
setPlayers(OthelloPlayer player1,
OthelloPlayer player2)
Assigns the agents that will be playing the current game. |
void |
updateTimeRemaining(OthelloPlayer player,
int secondsRemaining)
Callback function for updating the amount of time that remains before a player's deadline. |
void |
updateTimeUsed(OthelloPlayer player,
long millisUsed)
Callback function for updating the total amount of time (in milliseconds) a player has used thus far in the game. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ConsoleUserInterface()
| Method Detail |
|---|
public void handleStateUpdate(GameState newState)
UserInterface
handleStateUpdate in interface UserInterfacepublic OthelloPlayer[] getPlayers()
instanceof
OthelloPlayer that have been found in the
classpath and then calls System.exit(1).
getPlayers in interface UserInterface
public void setPlayers(OthelloPlayer player1,
OthelloPlayer player2)
UserInterface
setPlayers in interface UserInterface
public void updateTimeRemaining(OthelloPlayer player,
int secondsRemaining)
UserInterface
updateTimeRemaining in interface UserInterfacesecondsRemaining - The amount of time in seconds before
the end of player's deadline. A negative value
indicates that the player has an infinite deadline.
public void updateTimeUsed(OthelloPlayer player,
long millisUsed)
UserInterface
updateTimeUsed in interface UserInterface
|
Othello 1.0 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||