public Mine(int id,int xCoordinate, int delay, int damage, Player player) { this.Id = id; this.XCoordinate = xCoordinate; this.Delay = delay; this.Damage = damage; this.Player = player; }
public int CompareTo(Player other) { int result = this.Score.CompareTo(other.Score); if (result == 0) { result = string.CompareOrdinal(this.Name, other.Name); } return result; }
public void AddPlayer(string name, int mineRadius) { if (this.playersByName.ContainsKey(name)) { throw new ArgumentException("Player already exists!"); } if (mineRadius < 0) { throw new ArgumentException("Radius cannot be negative!"); } var player = new Player(name, mineRadius); this.playersByScore.Add(player); this.playersByName.Add(name, player); }
public int CompareTo(Player other) { throw new System.NotImplementedException(); }