mirror of https://github.com/captn3m0/modernart
Adds Draw One support
parent
f4df68533b
commit
3e64db3c10
@ -0,0 +1,19 @@
|
||||
array[Rounds,Players,Artists] of var bool: DrawOneCard;
|
||||
|
||||
% Total Playable Cards for any round are set equal to the Starting Hand
|
||||
array[Rounds,Players] of var int: PlayableCards;
|
||||
|
||||
% Playable Cards in any round = Starting Cards + Draw One cards that give you an extra playable card
|
||||
constraint forall(p in Players, r in Rounds) (
|
||||
PlayableCards[r,p] = StartingCardsInHand[r,p] + sum(a in Artists) (DrawOneCard[r,p,a])
|
||||
);
|
||||
|
||||
% Every artist only has a single Draw One Card
|
||||
constraint forall(a in Artists) (
|
||||
sum(p in Players, r in Rounds) (DrawOneCard[r,p,a]) = 1
|
||||
);
|
||||
|
||||
% Isolated count for DrawOne, you can only play your draw one, if you've atleast played that artist this round
|
||||
constraint forall(p in Players, r in Rounds, a in Artists) (
|
||||
visible_count_per_round_per_artist_per_player[r,p,a] >= DrawOneCard[r,p,a]
|
||||
);
|
@ -0,0 +1,15 @@
|
||||
% This file maintains common symbol constraints
|
||||
% Since we are modelling each symbol individually (and not "on-a-card"), this results in
|
||||
% symbol counts being calculated in isolation.
|
||||
% Sanity constraints on each symbol file individually ensure
|
||||
% that atleast one card of the symbol was played by the correct played
|
||||
% they do not ensure that across symbols
|
||||
% and hence, the same card may end up getting counted twice for different symbols.
|
||||
% this file prevents such issues
|
||||
% and may ultimately end up replacing separate symbol counters
|
||||
|
||||
constraint forall(r in Rounds, a in Artists) (
|
||||
sum (p in Players) (
|
||||
visible_count_per_round_per_artist_per_player[r,p,a] - DrawOneCard[r,p,a]
|
||||
) >= awards_per_round_per_artist[r,a]
|
||||
);
|
Loading…
Reference in New Issue