Пример #1
0
  protected int calcExpansionScore(FinalScoringEntry entry) {

    int rInt = 0;
    EuroFinalScoringEntry euroEntry;
    if (entry instanceof EuroFinalScoringEntry) {
      euroEntry = (EuroFinalScoringEntry) entry;
      rInt = euroEntry.getStationPoints();
    }
    return rInt;
  }
Пример #2
0
  protected void completeExpansionEntries(FinalScoringEntry entry, Player player) {

    if (player instanceof EuroPlayer) {
      EuroPlayer p = (EuroPlayer) player;
      if (entry instanceof EuroFinalScoringEntry) {
        EuroFinalScoringEntry euroEntry = (EuroFinalScoringEntry) entry;
        euroEntry.setStationPoints(4 * p.getStations().stationsLeft());
      }
    }
  }
Пример #3
0
  private int euroCompare(EuroFinalScoringEntry entry1, EuroFinalScoringEntry entry2) {

    /**
     * From the Europe rules: "The player with the most points wins the euroGame. If two or more
     * player are tied with the most points, the player who has completed the most Destination
     * Tickets is the winner. If still tied, the player who used the least number of Stations is
     * declared the winner. In the unlikely event player are still tied, the player with the
     * European Express bonus card wins."
     */
    int rValue = 99; // entry1 is better than entry2 as default

    if (entry2.getFinalScore() > entry1.getFinalScore()) {
      rValue = -99;
    } else if (entry2.getFinalScore() == entry1.getFinalScore()) {
      if (countTickets(entry2) > countTickets(entry1)) {
        rValue = -99;
      } else if (countTickets(entry2) == countTickets(entry1)) {
        if (entry2.getStationPoints() > entry1.getStationPoints()) {
          rValue = -99;
        } else if (entry2.getStationPoints() == entry1.getStationPoints()) {
          // this is a quick test for whether they have a longest track or not
          if (!entry2.getLongestTrack().isEmpty() && entry1.getLongestTrack().isEmpty()) {
            rValue = -99;
          } else if (!entry2.getLongestTrack().isEmpty() && !entry1.getLongestTrack().isEmpty()) {
            rValue = 0;
          }
        }
      }
    }
    return rValue;
  }