Grampus


Result Module

Namespace: Grampus

Assembly: GrampusLib.dll

Holds the functions related to the Game Result.

Functions and values

Function or value Description

Parse str

Full Usage: Parse str

Parameters:
    str : string - The string results such as 1-0.

Returns: GameResult The Game Result, such as GameResult.WhiteWins

Gets the GameResult type from a string.

str : string

The string results such as 1-0.

Returns: GameResult

The Game Result, such as GameResult.WhiteWins

ToInt result

Full Usage: ToInt result

Parameters:
Returns: int The result as an int, such as 2 for white win.

Gets the integer value (2 for white win, 0 for blackwin, 1 otherwise) for a Result.

result : GameResult
Returns: int

The result as an int, such as 2 for white win.

ToStr result

Full Usage: ToStr result

Parameters:
Returns: string The result as a string, such as 1-0

Gets the string symbol for a Result.

result : GameResult

The Game Result.

Returns: string

The result as a string, such as 1-0