コード例 #1
0
 /// <summary>
 /// reinitialize game to create new one
 /// </summary>
 /// <returns></returns>
 public async Task ReinitGame()
 {
     _blackjackGame  = new BlackjackGame();
     _messageBuilder = new BlackjackMessageBuilder(_blackjackGame);
     foreach (var entry in Websockets.ToList())
     {
         var wrapper = entry.Value;
         var user    = wrapper.BlackjackUser;
         if (user == null)
         {
             continue;
         }
         user = user.Reinit();
         _blackjackGame.AddUser(wrapper.Place, user);
     }
     await CheckStartGame(false);
 }
コード例 #2
0
 public BlackjackGameWebSocketHandler()
 {
     _messageBuilder = new BlackjackMessageBuilder(_blackjackGame);
 }