コード例 #1
0
 public void Add(Player player)
 {
     players.Add(player.ClientProxy, player);
     if (isFull())
     {
         Start();
     }
 }
コード例 #2
0
 internal void Add(Player player)
 {
     _players.Add(player.GuessService, player);
     if (isFull())
     {
         Start();
     }
     //throw new NotImplementedException();
 }
コード例 #3
0
 public static GuessGame JoinGame(Player player)
 {
     if (gameInstance == null)
     {
         gameInstance = new GuessGame();
     }
     if (gameInstance.isFull())
     {
         gameInstance = new GuessGame();
     }
     gameInstance.Add(player);
     return gameInstance;
 }
コード例 #4
0
 public static Game JoinGame(Player player)
 {
     if (unstartedGame == null)
     {
         unstartedGame = new Game();
     }
     if (unstartedGame.isFull())
     {
         unstartedGame = new Game();
     }
     unstartedGame.Add(player);
     return unstartedGame;
 }
コード例 #5
0
 public void AddName(string name)
 {
     Player player = new Player(name, _client);
     Game game = GameManager.JoinGame(player);
     currentGame = game;
 }
コード例 #6
0
 public void AddName(string name)
 {
     Player _currentPlayer = new Player(name, _client);
     _currentGuessGame = GameManager.JoinGame(_currentPlayer);
 }