Esempio n. 1
0
 public void PrepareForNextDrawer()
 {
     Selection         = string.Empty;
     WordsToChoose     = new List <string>();
     SelectionTemplate = new SelectionTemplate();
     Players.ForEach(player => player.HasGuessedCorrectly = false);
 }
Esempio n. 2
0
 public void Build()
 {
     try
     {
         var selection = SelectionTemplate?.CreateContent() as View;
         var expand    = DialogTemplate?.CreateContent() as View;
         DialogView    = CreateDialog(expand);
         SelectionView = CreateSelection(selection);
         Content       = SelectionView;
     }
     catch (Exception ex)
     {
     }
 }
Esempio n. 3
0
        public async Task SelectSelection(Player player, string word)
        {
            if (GetDrawingPlayer() == player && Selection == string.Empty)
            {
                SelectSelection(word);
                var selectionTemplate = new SelectionTemplate(word);

                _selectionTimer.Stop();
                _selectionTimer = null;

                _scoreCalculator.StartCounting();

                await _lobbyHub.Clients.GroupExcept(Id, new List <string> {
                    player.Connection
                })
                .SendAsync("ReceiveWordTemplate", selectionTemplate);

                await _lobbyHub.Clients.Client(player.Connection).SendAsync("ReceiveSelection", word);

                await StartTimers();
            }
        }