Class Player

A player in this game.

Every AI controls one player.

Fields

self.clientType What type of client this is, e.g.
self.color The color (side) of this player.
self.lost If the player lost the game or not.
self.name The name of the player.
self.opponent This player's opponent in the game.
self.reasonLost The reason why the player lost the game.
self.reasonWon The reason why the player won the game.
self.timeRemaining The amount of time (in ns) remaining for this AI to send commands.
self.won If the player won the game or not.
self.gameObjectName (inherited) String representing the top level Class that this game object is an instance of.
self.id (inherited) A unique id for each instance of a GameObject or a sub class.
self.logs (inherited) Any strings logged will be stored here.

Methods

Player:log (message) (inherited) Adds a message to this GameObject's logs.


Fields

self.clientType
What type of client this is, e.g. 'Python', 'JavaScript', or some other language. For potential data mining purposes.
self.color
The color (side) of this player. Either 'white' or 'black', with the 'white' player having the first move.
self.lost
If the player lost the game or not.
self.name
The name of the player.
self.opponent
This player's opponent in the game.
self.reasonLost
The reason why the player lost the game.
self.reasonWon
The reason why the player won the game.
self.timeRemaining
The amount of time (in ns) remaining for this AI to send commands.
self.won
If the player won the game or not.
self.gameObjectName
(inherited) String representing the top level Class that this game object is an instance of. Used for reflection to create new instances on clients, but exposed for convenience should AIs want this data.

See also:

self.id
(inherited) A unique id for each instance of a GameObject or a sub class. Used for client and server communication. Should never change value after being set.

See also:

self.logs
(inherited) Any strings logged will be stored here. Intended for debugging.

See also:

Methods

Player:log (message)
(inherited) Adds a message to this GameObject's logs. Intended for your own debugging purposes, as strings stored here are saved in the gamelog.

Parameters:

  • message string A string to add to this GameObject's log. Intended for debugging.

See also:

generated by LDoc 1.4.3 Last updated 2020-11-07 17:28:14