public List<Game> getOngoingGames() { List<Game> ongoingGames = new ArrayList<Game>(); for (TourneyEvent event : tourneyEvents) { ongoingGames.addAll(event.getOngoingGames()); } return ongoingGames; }
public List<Game> getWaitingGames() { List<Game> waitingGames = new ArrayList<Game>(); for (TourneyEvent event : tourneyEvents) { waitingGames.addAll(event.getWaitingGames()); } return waitingGames; }
public TourneyEvent getTourneyEvent(long eventId) { for (TourneyEvent tourneyEvent : tourneyEvents) { if (eventId == tourneyEvent.getId()) { return tourneyEvent; } } throw new RuntimeException(); }