// Per-quarter points scored for every superbowl - AFC,NFC let quarterPoints = [ ([ 0;10; 0; 0],[ 7; 7;14; 7]); ([ 0; 7; 0; 7],[ 3;13;10; 7]); ([ 0; 7; 6; 3],[ 0; 0; 0; 7]); ([ 3;13; 7; 0],[ 0; 0; 7; 0]); ([ 0; 6; 0;10],[ 3;10; 0; 0]); ([ 0; 3; 0; 0],[ 3; 7; 7; 7]); ([ 7; 7; 0; 0],[ 0; 0; 0; 7]); ([14; 3; 7; 0],[ 0; 0; 0; 7]); ([ 0; 2; 7; 7],[ 0; 0; 0; 6]); ([ 7; 0; 0;14],[ 7; 3; 0; 7]); ([ 0;16; 3;13],[ 0; 0; 7; 7]); ([ 0; 0;10; 0],[10; 3; 7; 7]); ([ 7;14; 0;14],[ 7; 7; 3;14]); ([ 3; 7; 7;14],[ 7; 6; 6; 0]); ([14; 0;10; 3],[ 0; 3; 0; 7]); ([ 0; 0; 7;14],[ 7;13; 0; 6]); ([ 7;10; 0; 0],[ 0;10; 3;14]); ([ 7;14;14; 3],[ 0; 3; 6; 0]); ([10; 6; 0; 0],[ 7;21;10; 0]); ([ 3; 0; 0; 7],[13;10;21; 2]); ([10; 0; 0;10],[ 7; 2;17;13]); ([10; 0; 0; 0],[ 0;35; 0; 7]); ([ 0; 3;10; 3],[ 3; 0; 3;14]); ([ 3; 0; 7; 0],[13;14;14;14]); ([ 3; 9; 0; 7],[ 3; 7; 7; 3]); ([ 0; 0;10;14],[ 0;17;14; 6]); ([ 7; 3; 7; 0],[14;14; 3;21]); ([ 3;10; 0; 0],[ 6; 0;14;10]); ([ 7; 3; 8; 8],[14;14;14; 7]); ([ 0; 7; 0;10],[10; 3; 7; 7]); ([14; 0; 7; 0],[10;17; 8; 0]); ([ 7;10; 7; 7],[ 7; 7; 3; 7]); ([ 7;10; 0;17],[ 3; 3; 0;13]); ([ 0; 0; 6;10],[ 3; 6; 7; 7]); ([ 7; 3;14;10],[ 0; 0; 7; 0]); ([ 0;14; 3; 3],[ 3; 0; 0;14]); ([ 3; 0; 6;12],[ 3;17;14;14]); ([ 0;14; 0;18],[ 0;10; 0;19]); ([ 0; 7; 7;10],[ 0; 7; 7; 7]); ([ 0; 7; 7; 7],[ 3; 0; 7; 0]); ([ 6;10; 6; 7],[14; 0; 3; 0]); ([ 0; 7; 0; 7],[ 3; 0; 0;14]); ([ 3;14; 3; 7],[ 0; 7; 0;16]); ([10; 0; 7; 0],[ 0; 6;10;15]); ([ 0;10; 7; 8],[14; 7; 0;10]); ([ 9; 0; 6; 6],[ 0;10; 7; 0]) ] // Dollars to win at the end of each quarter let prizes = [| 50; 125; 75; 250 |] let total points = Seq.scan (fun t p -> t + p) (List.head points) (List.tail points) let modulo = fun i -> i % 10 let modulos points = Seq.map modulo (total points) let quarterModulos = Seq.map (fun (afc, nfc) -> modulos afc, modulos nfc) quarterPoints let payoff : int[,] = Array2D.zeroCreate 10 10 let payQuarter (afc, nfc, prize) = payoff.[nfc,afc] <- payoff.[nfc,afc] + prize let payGame (afc, nfc) = Seq.iter payQuarter (Seq.zip3 afc nfc prizes) Seq.iter payGame quarterModulos payoff