C# Class GR.Gambling.Backgammon.GameState

ファイルを表示 Open project: alexhanh/Botting-Library Class Usage Examples

Public Methods

Method 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 method

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

CenterCube() public method

public CenterCube ( ) : void
return void

ChangeTurn() public method

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

Clone() public method

public Clone ( ) : GameState
return GameState

Deserialize() public static method

public static Deserialize ( string s ) : GameState
s string
return GameState

Double() public method

public Double ( ) : void
return void

Equals() public method

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

GameState() public method

public GameState ( GameType game_type ) : System
game_type GameType
return System

GetName() public method

public GetName ( int player ) : string
player int
return string

Reject() public method

public Reject ( ) : void
return void

Resign() public method

public Resign ( ResignValue resign_value ) : void
resign_value ResignValue
return void

Score() public method

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

Serialize() public static method

public static Serialize ( GameState gs ) : string
gs GameState
return string

SetCube() public method

public SetCube ( int value, int owner ) : void
value int
owner int
return void

SetDice() public method

public SetDice ( int first_die, int second_die ) : void
first_die int
second_die int
return void

SetDoubleOffer() public method

public SetDoubleOffer ( ) : void
return void

SetName() public method

public SetName ( int player, string name ) : void
player int
name string
return void

SetResignOffer() public method

public SetResignOffer ( ResignValue value ) : void
value ResignValue
return void

SetScore() public method

public SetScore ( int player0, int player1 ) : void
player0 int
player1 int
return void

Take() public method

public Take ( ) : void
return void

ToString() public method

public ToString ( ) : string
return string

Unroll() public method

Reset the dice to tray.
public Unroll ( ) : void
return void