Exemplo n.º 1
0
  public Town get(HexPoint pointLocation) {
    for (Town town : pieces) {
      if (town.getPoint().equals(pointLocation)) {
        return town;
      }
    }

    throw new AssertionError("Expected town with specified HexPoint");
  }
Exemplo n.º 2
0
  public boolean contains(HexPoint point) {
    for (Town town : pieces) if (town.getPoint().equals(point)) return true;

    return false;
  }