public bool equals(ProcessedPick o) { // Ignoring Vice Captainship since we don't really know if it will matter in the end return(footballer.rawData.footballer.id == o.footballer.rawData.footballer.id && pick.is_captain == o.pick.is_captain && pick.multiplier == o.pick.multiplier); }
public Score calculate(Picks picks, List <ProcessedPick> processedPicks, bool benchBoost) { // Find the footballers and tally the current score Score score = new Score(); for (int i = 0; i < processedPicks.Count; i++) { var isSub = !benchBoost && i >= 11; ProcessedPick processedPick = processedPicks[i]; Pick pick = processedPick.pick; var gwExplains = processedPick.footballer.rawData.explains; int thisScore = calculateFootballerScore(gwExplains) * pick.multiplier; if (!isSub) { score.startingScore += thisScore; } else { score.subScore += thisScore; } } score.startingScore -= picks != null && picks.entry_history != null ? picks.entry_history.event_transfers_cost : 0; return(score); }