ColorShapeLinks AI
An AI competition for the IEEE Conference on Games 2021
SessionController Class Reference

Script which controls ColorShapeLinks sessions, which can include one or more matches. More...

+ Inheritance diagram for SessionController:
+ Collaboration diagram for SessionController:

Public Member Functions

IThinker GetThinker (PColor thinkerColor)
 Get thinker of the specified color. More...
 

Properties

Board Board [get]
 The game board. More...
 
IThinker CurrentThinker [get]
 The current thinker. More...
 
int Rows [get]
 Number of board rows. More...
 
int Cols [get]
 Number of board columns. More...
 
int WinSequence [get]
 How many pieces in sequence to find a winner. More...
 
int RoundPiecesPerPlayer [get]
 Number of initial round pieces per player. More...
 
int SquarePiecesPerPlayer [get]
 Number of initial square round pieces per player More...
 
int TimeLimitMillis [get]
 Time limit for the AI to play in milliseconds. More...
 
float TimeLimitSeconds [get]
 Time limit for the AI to play in seconds. More...
 
int MinMoveTimeMillis [get]
 Even if the AI plays immediately, this time (in milliseconds) gives the illusion that the AI took some minimum time to make a move. More...
 
float MinMoveTimeSeconds [get]
 Even if the AI plays immediately, this time (in seconds) gives the illusion that the AI took some minimum time to make a move. More...
 
float LastMoveAnimLength [get]
 Last move animation length in seconds. More...
 
SessionState State [get]
 State of the current session. More...
 
ISessionConfig SessionConfig [get]
 Session configuration. More...
 
IMatchConfig MatchConfig [get]
 Match configuration. More...
 
Match CurrentMatch [get]
 The match currently being played. More...
 
IEnumerable< MatchMatches [get]
 All matches played or to be played in current session. More...
 
IEnumerable< KeyValuePair< Match, Winner > > Results [get]
 Results of matches played so far in current session. More...
 
IEnumerable< KeyValuePair< string, int > > Standings [get]
 Standings (classification, ranking) of thinkers in current session. More...
 
Winner LastMatchResult [get]
 Result of last match. More...
 
string WinnerString [get]
 The winner's name and color. More...
 
bool WhoPlaysFirst [get]
 Ask who plays first? More...
 
bool BlockStartNextMatch [get]
 Start of next match screen needs to be unlocked with a button? More...
 
bool BlockShowResult [get]
 Show result screen needs to be unlocked with a button? More...
 
float UnblockedScreenDuration [get]
 Duration of unblocked screens (start of next match, show result). More...
 
int PointsPerWin [get]
 Points per win. More...
 
int PointsPerLoss [get]
 Points per loss. More...
 
int PointsPerDraw [get]
 Points per loss. More...
 

Detailed Description

Script which controls ColorShapeLinks sessions, which can include one or more matches.

Based on the MVC design pattern, composed in this case by the following classes:

Member Function Documentation

◆ GetThinker()

IThinker GetThinker ( PColor  thinkerColor)

Get thinker of the specified color.

Parameters
thinkerColorColor of the thinker to get.
Returns
Thinker of the specified color.
See also
IMatchDataProvider.GetThinker(PColor)

Implements IMatchDataProvider.

Property Documentation

◆ BlockShowResult

bool BlockShowResult
get

Show result screen needs to be unlocked with a button?

true if show result screen needs to be unlocked with a button, false otherwise.

See also
IUnitySessionDataProvider.BlockShowResult

◆ BlockStartNextMatch

bool BlockStartNextMatch
get

Start of next match screen needs to be unlocked with a button?

true if start of next match screen needs to be unlocked with a button, false otherwise.

See also
IUnitySessionDataProvider.BlockStartNextMatch

◆ Board

Board Board
get

The game board.

The game board.

See also
IMatchDataProvider.Board

◆ Cols

int Cols
get

Number of board columns.

Number of board columns.

See also
ColorShapeLinks.Common.Session.IMatchConfig.Cols

◆ CurrentMatch

Match CurrentMatch
get

The match currently being played.

See also
ColorShapeLinks.Common.Session.ISessionDataProvider.CurrentMatch

◆ CurrentThinker

IThinker CurrentThinker
get

The current thinker.

The current thinker.

See also
IMatchDataProvider.CurrentThinker

◆ LastMatchResult

Winner LastMatchResult
get

Result of last match.

One of the values of the Winner enumeration.

See also
ColorShapeLinks.Common.Session.ISessionDataProvider.LastMatchResult

◆ LastMoveAnimLength

float LastMoveAnimLength
get

Last move animation length in seconds.

Last move animation length in seconds.

See also
IMatchViewConfig.LastMoveAnimLength

◆ MatchConfig

Match configuration.

Match configuration consists of number of board rows and columns, how many pieces in a row to win, initial number of pieces, etc.

See also
ColorShapeLinks.Common.Session.ISessionDataProvider.MatchConfig

◆ Matches

IEnumerable<Match> Matches
get

All matches played or to be played in current session.

Collection of matches.

See also
ColorShapeLinks.Common.Session.ISessionDataProvider.Matches

◆ MinMoveTimeMillis

int MinMoveTimeMillis
get

Even if the AI plays immediately, this time (in milliseconds) gives the illusion that the AI took some minimum time to make a move.

Minimum apparent move time in seconds.

See also
ColorShapeLinks.Common.Session.IMatchConfig.MinMoveTimeMillis

◆ MinMoveTimeSeconds

float MinMoveTimeSeconds
get

Even if the AI plays immediately, this time (in seconds) gives the illusion that the AI took some minimum time to make a move.

Minimum apparent move time in seconds.

See also
ColorShapeLinks.Common.Session.IMatchConfig.MinMoveTimeSeconds

◆ PointsPerDraw

int PointsPerDraw
get

◆ PointsPerLoss

int PointsPerLoss
get

◆ PointsPerWin

int PointsPerWin
get

◆ Results

IEnumerable<KeyValuePair<Match, Winner> > Results
get

Results of matches played so far in current session.

Collection of match-winner pairs.

See also
ColorShapeLinks.Common.Session.ISessionDataProvider.Results

◆ RoundPiecesPerPlayer

int RoundPiecesPerPlayer
get

Number of initial round pieces per player.

Number of initial round pieces per player.

See also
ColorShapeLinks.Common.Session.IMatchConfig.RoundPiecesPerPlayer

◆ Rows

int Rows
get

Number of board rows.

Number of board rows.

See also
ColorShapeLinks.Common.Session.IMatchConfig.Rows

◆ SessionConfig

ISessionConfig SessionConfig
get

Session configuration.

Session configuration consists of points per win, per loss and per draw.

See also
ColorShapeLinks.Common.Session.ISessionDataProvider.SessionConfig

◆ SquarePiecesPerPlayer

int SquarePiecesPerPlayer
get

Number of initial square round pieces per player

Number of initial square round pieces per player

See also
ColorShapeLinks.Common.Session.IMatchConfig.SquarePiecesPerPlayer

◆ Standings

IEnumerable<KeyValuePair<string, int> > Standings
get

Standings (classification, ranking) of thinkers in current session.

Descending ordered collection of thinker-points pairs.

See also
ColorShapeLinks.Common.Session.ISessionDataProvider.Standings

◆ State

SessionState State
get

State of the current session.

One of the values defined in the SessionState enumeration.

See also
ColorShapeLinks.Common.Session.ISessionDataProvider.State

◆ TimeLimitMillis

int TimeLimitMillis
get

Time limit for the AI to play in milliseconds.

Time limit for the AI to play in milliseconds.

See also
ColorShapeLinks.Common.Session.IMatchConfig.TimeLimitMillis

◆ TimeLimitSeconds

float TimeLimitSeconds
get

Time limit for the AI to play in seconds.

Time limit for the AI to play in seconds.

See also
ColorShapeLinks.Common.Session.IMatchConfig.TimeLimitSeconds

◆ UnblockedScreenDuration

float UnblockedScreenDuration
get

Duration of unblocked screens (start of next match, show result).

Duration in seconds.

See also
IUnitySessionDataProvider.UnblockedScreenDuration

◆ WhoPlaysFirst

bool WhoPlaysFirst
get

Ask who plays first?

true if UI is to ask who plays first, false otherwise.

See also
IUnitySessionDataProvider.WhoPlaysFirst

◆ WinnerString

string WinnerString
get

The winner's name and color.

A string containing the winner's name and color.

See also
ColorShapeLinks.Common.Session.ISessionDataProvider.WinnerString

◆ WinSequence

int WinSequence
get

How many pieces in sequence to find a winner.

How many pieces in sequence to find a winner.

See also
ColorShapeLinks.Common.Session.IMatchConfig.WinSequence

The documentation for this class was generated from the following file: