public boolean isStrongWilledVictory() {
   Goal goal = match.getScore().getGoalByIndex(1);
   if (goal == null) {
     return false;
   }
   return goal.getWhoScored() == TeamLocation.GUEST
       ? match.getFulltimeResults() == Results.HOME
       : match.getFulltimeResults() == Results.GUEST;
 }
 public boolean isFirstGoalTillMinute(int minute) {
   Goal goal = match.getScore().getGoalByIndex(1);
   if (goal == null) {
     return false;
   }
   return (goal.getMinute() + (20 * (goal.getPeriod() - 1))) < minute;
 }
 public int getTeamMatchTotal(TeamLocation teamLocation) {
   if (teamLocation == TeamLocation.ANY) {
     throw new RuntimeException("lol");
   }
   int fulltimeHomeTotal = match.getScore().getFulltimeHomeTotal();
   int fulltimeGuestTotal = match.getScore().getFulltimeGuestTotal();
   if (teamLocation == TeamLocation.HOME) {
     return fulltimeHomeTotal;
   } else if (teamLocation == TeamLocation.GUEST) {
     return fulltimeGuestTotal;
   } else if (match.getFavoriteInfo().getFavorite() == Favorite.NONE) {
     throw new RuntimeException("lol");
   } else if (teamLocation == TeamLocation.FAVORITE) {
     return isFavoriteHome() ? fulltimeHomeTotal : fulltimeGuestTotal;
   } else if (teamLocation == TeamLocation.NOTFAVORITE) {
     return isFavoriteHome() ? fulltimeGuestTotal : fulltimeHomeTotal;
   }
   throw new RuntimeException("lol");
 }
 private boolean isTeamWinInFulltime(TeamLocation teamLocation) {
   if (teamLocation == TeamLocation.ANY) {
     throw new RuntimeException("lol");
   }
   Results fulltimeResults = match.getFulltimeResults();
   if (teamLocation == TeamLocation.HOME || teamLocation == TeamLocation.GUEST) {
     return teamLocation.equals(fulltimeResults);
   }
   if (teamLocation == TeamLocation.FAVORITE) {
     return isFavoriteHome() ? fulltimeResults == Results.HOME : fulltimeResults == Results.GUEST;
   }
   if (teamLocation == TeamLocation.NOTFAVORITE) {
     return isFavoriteHome() ? fulltimeResults == Results.GUEST : fulltimeResults == Results.HOME;
   }
   throw new RuntimeException("lol");
 }
 public boolean isScoredFirstGoal(TeamLocation teamLocation) {
   TeamLocation whoScoredFirstGoal = match.getScore().whoScoredFirstGoal();
   if (whoScoredFirstGoal == null) {
     return false;
   }
   if (teamLocation == TeamLocation.ANY) {
     return true;
   } else if (teamLocation == TeamLocation.HOME || teamLocation == TeamLocation.GUEST) {
     return teamLocation.equals(whoScoredFirstGoal);
   } else if (teamLocation == TeamLocation.FAVORITE) {
     return isFavoriteHome()
         ? whoScoredFirstGoal == TeamLocation.HOME
         : whoScoredFirstGoal == TeamLocation.GUEST;
   } else if (teamLocation == TeamLocation.NOTFAVORITE) {
     return isFavoriteHome()
         ? whoScoredFirstGoal == TeamLocation.GUEST
         : whoScoredFirstGoal == TeamLocation.HOME;
   } else {
     throw new RuntimeException("lol");
   }
 }
 public boolean isTeamScoredNGoalsInPeriod(TeamLocation teamLocation, int period, Double total) {
   if (teamLocation == TeamLocation.ANY) {
     throw new RuntimeException("lol");
   }
   Period periodByNumber = getPeriodByNumber(period);
   int homeTotal = periodByNumber.getHomeTotal();
   int guestTotal = periodByNumber.getGuestTotal();
   int teamTotalInPeriod;
   if (teamLocation == TeamLocation.HOME) {
     teamTotalInPeriod = homeTotal;
   } else if (teamLocation == TeamLocation.GUEST) {
     teamTotalInPeriod = guestTotal;
   } else if (match.getFavoriteInfo().getFavorite() == Favorite.NONE) {
     throw new RuntimeException("lol");
   } else if (teamLocation == TeamLocation.FAVORITE) {
     teamTotalInPeriod = isFavoriteHome() ? homeTotal : guestTotal;
   } else if (teamLocation == TeamLocation.NOTFAVORITE) {
     teamTotalInPeriod = isFavoriteHome() ? guestTotal : homeTotal;
   } else {
     throw new RuntimeException("lol");
   }
   return teamTotalInPeriod >= total;
 }
 public boolean areBothTeamScored() {
   return match.getScore().areBothTeamScored();
 }
 public boolean isAnyTeamWinWithDifference(int difference) {
   int fulltimeGuestTotal = match.getScore().getFulltimeGuestTotal();
   int fulltimeHomeTotal = match.getScore().getFulltimeHomeTotal();
   return Math.abs(fulltimeGuestTotal - fulltimeHomeTotal) == difference;
 }
 public boolean areBothTeamScoredInEachPeriod() {
   return match.getScore().areBothTeamScoredInEachPeriod();
 }
 private TeamLocation getTeamLocationByTeam(Team team) {
   return match.getTeamLocationByTeam(team);
 }
 public int getGuestTotal() {
   return match.getScore().getFulltimeGuestTotal();
 }
 public Period getPeriodByNumber(int period) {
   return match.getScore().getPeriodByNumber(period);
 }
 public int getHomeTotal() {
   return match.getScore().getFulltimeHomeTotal();
 }
 public int getGeneralTotal() {
   return match.getScore().getFulltimeGeneralTotal();
 }
 private boolean isFavoriteHome() {
   return match.getFavoriteInfo().getFavorite() == Favorite.HOME;
 }