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

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

    return waitingGames;
  }
Ejemplo n.º 3
0
  public TourneyEvent getTourneyEvent(long eventId) {
    for (TourneyEvent tourneyEvent : tourneyEvents) {
      if (eventId == tourneyEvent.getId()) {
        return tourneyEvent;
      }
    }

    throw new RuntimeException();
  }