C# Class GR.Gambling.Backgammon.GameState

Afficher le fichier Open project: alexhanh/Botting-Library Class Usage Examples

Méthodes publiques

Méthode Description
CanDouble ( ) : bool

Tries to deduce if the player on turn can double.

CenterCube ( ) : void
ChangeTurn ( ) : void

Flips the current player on roll and sets the roller also as the player on turn, resets the dice.

Clone ( ) : GameState
Deserialize ( string s ) : GameState
Double ( ) : void
Equals ( GameState state ) : bool

Compares this to another game state and determines if they are the same.

GameState ( GameType game_type ) : System
GetName ( int player ) : string
Reject ( ) : void
Resign ( ResignValue resign_value ) : void
Score ( int player ) : int

Serialize ( GameState gs ) : string
SetCube ( int value, int owner ) : void
SetDice ( int first_die, int second_die ) : void
SetDoubleOffer ( ) : void
SetName ( int player, string name ) : void
SetResignOffer ( ResignValue value ) : void
SetScore ( int player0, int player1 ) : void
Take ( ) : void
ToString ( ) : string
Unroll ( ) : void

Reset the dice to tray.

Method Details

CanDouble() public méthode

Tries to deduce if the player on turn can double.
public CanDouble ( ) : bool
Résultat bool

CenterCube() public méthode

public CenterCube ( ) : void
Résultat void

ChangeTurn() public méthode

Flips the current player on roll and sets the roller also as the player on turn, resets the dice.
public ChangeTurn ( ) : void
Résultat void

Clone() public méthode

public Clone ( ) : GameState
Résultat GameState

Deserialize() public static méthode

public static Deserialize ( string s ) : GameState
s string
Résultat GameState

Double() public méthode

public Double ( ) : void
Résultat void

Equals() public méthode

Compares this to another game state and determines if they are the same.
public Equals ( GameState state ) : bool
state GameState
Résultat bool

GameState() public méthode

public GameState ( GameType game_type ) : System
game_type GameType
Résultat System

GetName() public méthode

public GetName ( int player ) : string
player int
Résultat string

Reject() public méthode

public Reject ( ) : void
Résultat void

Resign() public méthode

public Resign ( ResignValue resign_value ) : void
resign_value ResignValue
Résultat void

Score() public méthode

public Score ( int player ) : int
player int The player who's current match score is returned.
Résultat int

Serialize() public static méthode

public static Serialize ( GameState gs ) : string
gs GameState
Résultat string

SetCube() public méthode

public SetCube ( int value, int owner ) : void
value int
owner int
Résultat void

SetDice() public méthode

public SetDice ( int first_die, int second_die ) : void
first_die int
second_die int
Résultat void

SetDoubleOffer() public méthode

public SetDoubleOffer ( ) : void
Résultat void

SetName() public méthode

public SetName ( int player, string name ) : void
player int
name string
Résultat void

SetResignOffer() public méthode

public SetResignOffer ( ResignValue value ) : void
value ResignValue
Résultat void

SetScore() public méthode

public SetScore ( int player0, int player1 ) : void
player0 int
player1 int
Résultat void

Take() public méthode

public Take ( ) : void
Résultat void

ToString() public méthode

public ToString ( ) : string
Résultat string

Unroll() public méthode

Reset the dice to tray.
public Unroll ( ) : void
Résultat void