I'm being stubborn and trying to code it in a single set of nested IF statements. I'm not sure if that is possible. Struggling with the logic for addressing predicting a favorite to win but not beat the spread.
It gets weird because of the sign conventions for the contest. Definitely a bit tricky, but here is my try going for it on my phone ignoring ties:
Let's say GT+10 vs FSU
pick : predicted number, 11, means GT loses by 11, minus means GT wins
spread: pre-game spread, +10, always a positive number from the perspective of the underdog
result: game result, +20 meaning GT lost by 20, -5 GT won by 5
score: 0, how many points user got
// 1 point for game result
If((result < 0 AND pick < 0) OR (result > 0 AND pick > 0)) { score = score + 1 }
// 2 points for spread
If(result < 0) {
// GT won, cover by default
if (pick < spread) { score = score + 2 }
} else if (result > 0) {
// FSU won
if (((spread <= result) AND (spread <= pick)) OR ((spread > result) AND (spread > pick))) {
score = score + 2
}
}
You can write it more compact by comparing differences but then it would be more difficult to read.