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

Implements a session of ColorShapeLinks matches, setting up matches and keeping track of the results and classifications. More...

+ Inheritance diagram for Session:
+ Collaboration diagram for Session:

Public Member Functions

 Session (IEnumerable< IThinkerPrototype > thinkerPrototypes, ISessionConfig sessionConfig, bool complete=false)
 Creates a new session. More...
 
IEnumerable< KeyValuePair< Match, Winner > > GetResults ()
 Returns the current results. More...
 
IEnumerable< KeyValuePair< string, int > > GetStandings ()
 Return the current standings/classification. More...
 
IEnumerator< MatchGetEnumerator ()
 Return all scheduled matches, completed or otherwise. More...
 
bool NextMatch (out Match match)
 Get next match. More...
 
void SetResult (Winner result)
 Set the result of the last match. More...
 

Detailed Description

Implements a session of ColorShapeLinks matches, setting up matches and keeping track of the results and classifications.

Constructor & Destructor Documentation

◆ Session()

Session ( IEnumerable< IThinkerPrototype thinkerPrototypes,
ISessionConfig  sessionConfig,
bool  complete = false 
)
inline

Creates a new session.

Parameters
thinkerPrototypesPrototypes of thinkers participating in the session.
sessionConfigSession configuration.
completeIs this a complete tournament, i.e., do thinkers play against opponents home and away (two games)?

Member Function Documentation

◆ GetEnumerator()

IEnumerator<Match> GetEnumerator ( )

Return all scheduled matches, completed or otherwise.

Returns
All scheduled matches.

◆ GetResults()

IEnumerable<KeyValuePair<Match, Winner> > GetResults ( )
inline

Returns the current results.

Returns
The current results.

◆ GetStandings()

IEnumerable<KeyValuePair<string, int> > GetStandings ( )
inline

Return the current standings/classification.

Returns
The current standings/classification.

◆ NextMatch()

bool NextMatch ( out Match  match)
inline

Get next match.

Parameters
matchVariable where to place the next match to play.
Returns
true if there is another match to play, false otherwise.

◆ SetResult()

void SetResult ( Winner  result)
inline

Set the result of the last match.

Parameters
resultResult of the given match.
Exceptions
InvalidOperationExceptionThrown when the last match already has a result or the result is invalid.

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