ColorShapeLinks
An assignment for the AI course unit of the Bachelor in Videogames at Lusófona University
|
Base class for AI player configuration classes. More...
Public Member Functions | |
abstract void | Setup () |
This method will be called before a match starts. More... | |
override string | ToString () |
A string representation of this player. Equivalent to AIPlayer.PlayerName. More... | |
Public Attributes | |
bool | IsActive => isActive |
Is the AI active? More... | |
bool | IsHuman => false |
Is the player human? More... | |
Protected Member Functions | |
virtual void | Awake () |
Awake is called when the script instance is being loaded. More... | |
Properties | |
float | AITimeLimit [get, private set] |
The time in seconds available for the AI to play. More... | |
abstract string | PlayerName [get] |
The player's name. More... | |
abstract IThinker | Thinker [get] |
The player's thinker. More... | |
![]() | |
bool | IsHuman [get] |
Is the player human? More... | |
string | PlayerName [get] |
Name of the player. More... | |
IThinker | Thinker [get] |
The player's thinker. More... | |
Private Attributes | |
bool | isActive = true |
Unity Editor variable which defines if the is active. More... | |
Base class for AI player configuration classes.
Concrete AIs should extend this class and implement its abstract members. The child class should then be added as a component of the SessionConfiguration
game object in the Unity editor.
Definition at line 16 of file AIPlayer.cs.
|
inlineprotectedvirtual |
Awake is called when the script instance is being loaded.
Extending classes may override this method for their own awake-time configuration, but in doing so they must invoke the parent Awake()
(this method) as follows:
Definition at line 67 of file AIPlayer.cs.
|
pure virtual |
This method will be called before a match starts.
Extending classes must override this method and use it for instantianting their own implementation of IThinker.
Implemented in LoserSleeperAI, RandomAI, and SequentialAI.
override string ToString | ( | ) |
A string representation of this player. Equivalent to AIPlayer.PlayerName.
|
private |
Unity Editor variable which defines if the is active.
Definition at line 21 of file AIPlayer.cs.
bool IsActive => isActive |
Is the AI active?
true
if the AI is active, false
otherwise.
Definition at line 25 of file AIPlayer.cs.
bool IsHuman => false |
Is the player human?
Always false
.
Definition at line 34 of file AIPlayer.cs.
|
getprivate setprotected |
The time in seconds available for the AI to play.
A time interval in seconds.
Definition at line 29 of file AIPlayer.cs.
|
get |
The player's name.
A string representing the player's name.
Definition at line 39 of file AIPlayer.cs.
|
get |
The player's thinker.
An instance of IThinker.
Definition at line 44 of file AIPlayer.cs.