diff --git a/MafiaGame/MainWindow.xaml.cs b/MafiaGame/MainWindow.xaml.cs index 2696efd..832a529 100644 --- a/MafiaGame/MainWindow.xaml.cs +++ b/MafiaGame/MainWindow.xaml.cs @@ -275,6 +275,13 @@ namespace MafiaGame public void ShowDay(bool voting, Role role, List players) { GameDaySelect.IsEnabled = voting; + GameDaySelect.Items.Clear(); + foreach (Player player in players) + { + ListBoxItem item = new ListBoxItem(); + item.Content = player.Id.ToString() + ") " + player.Name; + GameDaySelect.Items.Add(item); + } if (role == Role.Died) { GameDayHotBar.Text = "Коли умер, жди"; @@ -284,12 +291,6 @@ namespace MafiaGame if (voting) { GameDayHotBar.Text = "Голосуй и молись"; - foreach (Player player in players) - { - ListBoxItem item = new ListBoxItem(); - item.Content = player.Id.ToString() + ") " + player.Name; - MainWindow.Instance.GameDaySelect.Items.Add(item); - } } else {