Example #1
0
 /// <summary>
 /// Sets who this player view belongs to
 /// </summary>
 /// <param name="player"></param>
 public void SetPlayer(Player player)
 {
     PlayerNumberLabel.Text = player.PlayerNumber.ToString();
     PlayerCircle.Fill = player.PlayerNumber.Color();
     PlayerName.Text = player.Name;
     PlayerUnits.Text = $"Units: {player.TotalUnits}";
     TurnIndicator.Fill = player.PlayerNumber.Color();
 }
Example #2
0
 /// <summary>
 /// Adds a player to this game.
 /// </summary>
 /// <param name="player"></param>
 public void AddPlayer(Player player)
 {
     GameLog.AddEvent(player.Name + " has joined the battle!");
     var ct = Players.Count +  1;
     player.PlayerNumber = (PlayerNumber) ct;
     Players[(PlayerNumber)ct] = player;
 }