This is a MiniZinc based attempt to solve the Modern Art: Masters Gallery game.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
815 B

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]