public Treasure openTreasure(Coordinates position) { if (!grid.isTreasure(position)) { return(null); } foreach (Treasure t in treasures) { if (position.Equals(t.position)) { return(t); } } return(null); }
public Treasure openTreasure(Coordinates position) { if (!grid.isTreasure(position)) { return(null); } foreach (Treasure t in treasures) { if (position.Equals(t.position)) { return(t); } } return(null); }