Пример #1
0
 public static TexasHoldemSystem getInstance()
 {
     if (instance == null)
     {
         return(instance = new TexasHoldemSystem());
     }
     return(instance);
 }
Пример #2
0
        public ClientGame(Game game)
        {
            GameSystem.TexasHoldemSystem system = GameSystem.TexasHoldemSystem.userSystemFactory.getInstance();
            id = game.getGameID();
            gamePref = game.GetGamePref();
            pot = game.getPot();
            gameDeck = game.getDeck();

            players = game.GetPlayers().Select(pl => new ClientUserProfile(system.getUser(pl.GetUserName()))).ToList();
            spectators = game.GetSpectators().Select(pl => new ClientUserProfile(system.getUser(pl.GetUserName()))).ToList();

            foreach (KeyValuePair<PlayingUser, int> p in game.getplayerBets())
                playerBets.Add(p.Key.GetUserName(), p.Value);
        }
Пример #3
0
 public static void clean()
 {
     instance = null;;
 }