coderkat-zz / PlaySet

A python program to solve Set!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

A simple python 'Set' solver!

The Game

In case you're unfamiliar with Set, you can read about it or try this tutorial.

The Program

Given a number of cards in a player's hand, this Set solver takes an arbitrary (user-provided) number of dimensions per card (i.e. a card has a background color in addition to color, shape, shading, and number, giving the card 5 dimensions) and an arbitrary size (i.e. each card may now have 4 of every dimension instead of the standard 3).

The game will default to a hand of 12 cards with 4 diemsions and 3 options for each dimension ('dimension size'), as well as a standard set size of 3 cards. The user may chose to alter any of these settings, but must have at minimum a set size of 3 cards. To solve set with these default value, the user can just hit 'enter' at each prompt.

The solver will print out the player's hand as well as every possible set that can be made from that hand.

Run the game

Please use Python3 to run this program. There are no other dependencies. $ python set_solver.py

Run unit tests

$ python -m unittest tests.py

TODO: a list!

  • Allow users to input actual values for dimensions, i.e. user can add a new color, yellow, to the color dimension. That way, output is a little more fun and readable.
  • Let users guess the sets themselves, then check if they're correct or not: aka, actually PLAY set.

About

A python program to solve Set!


Languages

Language:Python 100.0%