GR.Gambling.Backgammon.GameState.Score C# (CSharp) Method

Score() public method

public Score ( int player ) : int
player int The player who's current match score is returned.
return int
        public int Score(int player)
        {
            return score[player];
        }

Usage Example

Beispiel #1
0
 /// <summary>
 /// TODO: Solve the "I'm sorry, but SetMatchID cannot handle positions where a double has been offered" bullshit.
 /// </summary>
 /// <param name="gamestate"></param>
 /// <returns></returns>
 public static string MatchID(GameState gamestate)
 {
     Console.WriteLine("Cube owner: " + gamestate.Cube.Owner);
     return MatchID(
         gamestate.Dice[0],
         gamestate.Dice[1],
         gamestate.PlayerOnTurn,
         (int)gamestate.ResignOfferValue,
         (gamestate.OfferType == OfferType.Double) ? 1 : 0,
         gamestate.PlayerOnRoll,
         (gamestate.Cube.Owner >= 0) ? gamestate.Cube.Owner : 2,
         gamestate.IsCrawford ? 1 : 0,
         gamestate.MatchTo,
         gamestate.Score(0),
         gamestate.Score(1),
         gamestate.Cube.Value,
         (int)GnuBGGameState.GAME_PLAYING
         );
 }
All Usage Examples Of GR.Gambling.Backgammon.GameState::Score