示例#1
0
  public List<Game> getOngoingGames() {
    List<Game> ongoingGames = new ArrayList<Game>();
    for (TourneyEvent event : tourneyEvents) {
      ongoingGames.addAll(event.getOngoingGames());
    }

    return ongoingGames;
  }
示例#2
0
  public List<Game> getWaitingGames() {
    List<Game> waitingGames = new ArrayList<Game>();
    for (TourneyEvent event : tourneyEvents) {
      waitingGames.addAll(event.getWaitingGames());
    }

    return waitingGames;
  }
示例#3
0
  public TourneyEvent getTourneyEvent(long eventId) {
    for (TourneyEvent tourneyEvent : tourneyEvents) {
      if (eventId == tourneyEvent.getId()) {
        return tourneyEvent;
      }
    }

    throw new RuntimeException();
  }