public override bool Equals(object obj) { if (this == obj) { return(true); } if (obj == null || GetType() != obj.GetType()) { return(false); } PlayerId playerId = (PlayerId)obj; return(id == playerId.id); }
public Game() { Constants.PopulateConstants(Input.ReadLine()); Input input = Input.ReadInput(); int numPlayers = input.GetInt(); myId = new PlayerId(input.GetInt()); Log.Open(myId.id); for (int i = 0; i < numPlayers; i++) { players.Add(Player._generate()); } me = players[myId.id]; gameMap = GameMap._generate(); }
private Player(PlayerId id, Shipyard shipyard) { this.id = id; this.shipyard = shipyard; }