20200611 10:26:20 +00:00



% Score a player gets in each given round




array[Rounds,Players] of var int: RoundScore;








% Final score of a player




array[Players] of var int: Score;








% For Cumulative Scoring

20200610 19:17:54 +00:00



% Score = ranking_score + award_score if an award was given this round




constraint forall(r in Rounds, a in Artists) (




total_score_per_round_per_artist[r,a] =

20200611 10:26:20 +00:00



ranking_score_per_artist_per_round[r,a] + award_bonus_per_round_per_artist[r,a] +




if r=Round1 then




0




else




total_score_per_round_per_artist[enum_prev(Rounds, r),a] endif

20200610 19:17:54 +00:00



);





20200611 13:54:22 +00:00



% This is same as total_score but force set to zero if the artist is not ranked




% This is what each player gets for each card they play




array[Rounds,Artists] of var int: ArtistScore;




constraint forall(r in Rounds, a in Artists) (




ArtistScore[r,a] = if IsArtistRanked[r,a] then total_score_per_round_per_artist[r,a] else 0 endif




);

20200610 19:17:54 +00:00




20200611 13:54:22 +00:00



% Calculate total score per player

20200610 19:17:54 +00:00



% 1. Per Round




constraint forall(r in Rounds, p in Players) (

20200610 22:15:17 +00:00



RoundScore[r,p] = sum(a in Artists) (

20200611 13:54:22 +00:00



visible_count_per_round_per_artist_per_player[r,p,a] * ArtistScore[r,a]

20200610 19:17:54 +00:00



)




);








% 2. For the whole game




constraint forall(p in Players) (

20200610 22:15:17 +00:00



Score[p] = sum(r in Rounds) (RoundScore[r,p])

20200610 19:17:54 +00:00



);
