Пример #1
0
 public ChessMatch(PlayerInRoom player1, PlayerInRoom player2, string roomId)
 {
     PlayerOne = player1;
     PlayerTwo = player2;
     RoomId    = roomId;
     Match     = Match.Create(player1.UserId, player2.UserId);
 }
Пример #2
0
 public async Task InitMatch(PlayerInRoom playerOne, PlayerInRoom playerTwo, string roomId)
 {
     _currentMatches.Add(new ChessMatch(playerOne, playerTwo, roomId));
     await Task.CompletedTask;
 }
Пример #3
0
 public async Task RemoveFromWaitingList(PlayerInRoom player)
 {
     _waitingPlayerList.Remove(player);
     await Task.CompletedTask;
 }
Пример #4
0
 public async Task AddToWaitingList(PlayerInRoom playerInRoom)
 {
     _waitingPlayerList.Add(playerInRoom);
     await Task.CompletedTask;
 }