コード例 #1
0
ファイル: ChatHub.cs プロジェクト: pebblecode/ThinkSprint
 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
ファイル: ChatHub.cs プロジェクト: pebblecode/ThinkSprint
 public void StartGame()
 {
     _startedGames[_newGame.Name] = _newGame;
     SendQuestion(_newGame);
     _newGame = new Game();
 }