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 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 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"); }
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 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(); }
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(); }