public class AI
extends joueur.BaseAI
Modifier and Type | Field and Description |
---|---|
Game |
game
This is the Game object itself, it contains all the information about the current game
|
Player |
player
This is your AI's player.
|
Constructor and Description |
---|
AI() |
Modifier and Type | Method and Description |
---|---|
void |
ended(boolean won,
java.lang.String reason)
This is automatically called when the game ends.
|
void |
gameUpdated()
This is automatically called every time the game (or anything in it) updates.
|
java.lang.String |
getName()
This returns your AI's name to the game server.
|
java.lang.String |
getSetting(java.lang.String key)
Gets an AI setting passed to the program via the `--aiSettings` flag.
|
java.lang.String |
makeMove()
This is called every time it is this AI.player's turn to make a move.
|
void |
start()
This is automatically called when the game first starts, once the Game object and all GameObjects have been initialized, but before any players do anything.
|
public Game game
public Player player
public java.lang.String getName()
getName
in class joueur.BaseAI
public void start()
start
in class joueur.BaseAI
public void gameUpdated()
gameUpdated
in class joueur.BaseAI
public void ended(boolean won, java.lang.String reason)
ended
in class joueur.BaseAI
won
- true if your player won, false otherwisereason
- a string explaining why you won or lostpublic java.lang.String makeMove()
public java.lang.String getSetting(java.lang.String key)
getSetting
in class joueur.BaseAI
key
- The key of the setting you wish to get the value for© 2020 MST ACM SIG-GAME