Пример #1
0
 private void SendQuestion(Game game)
 {
     var question = game.Provider.GetNextQuestion();
     Clients.Group(game.Name).RecieveQuestion(game.Players[game.PlayerIndex].Name, question);
     Clients.Caller.RecieveQuestion(game.Players[game.PlayerIndex].Name, question);
     game.PlayerIndex++;
     game.PlayerIndex = game.PlayerIndex % 2;
 }
Пример #2
0
 public void StartGame()
 {
     _startedGames[_newGame.Name] = _newGame;
     SendQuestion(_newGame);
     _newGame = new Game();
 }