Fix bug with vote

This commit is contained in:
Ilya 2021-02-11 22:55:34 +03:00
parent 21a156fcf9
commit ea0e0d0948

View File

@ -275,6 +275,13 @@ namespace MafiaGame
public void ShowDay(bool voting, Role role, List<Player> 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
{