public Town get(HexPoint pointLocation) { for (Town town : pieces) { if (town.getPoint().equals(pointLocation)) { return town; } } throw new AssertionError("Expected town with specified HexPoint"); }
public boolean contains(HexPoint point) { for (Town town : pieces) if (town.getPoint().equals(point)) return true; return false; }