CSSE 120 Final Python Project

Project Requirements

The final project for the Python part of this course is to implement the Game of SET. At the following URL, you can find

http://www.setgame.com/set/index.html

  1. Your team must design and implement something like the SET On-Line Daily Puzzle:
    1. Displays 3 x 4 grid of twelve cards chosen randomly from a shuffled SET deck
    2. Allows user to select three cards by clicking the mouse, determines whether they constitute a SET that has not already been found
    3. Dispays all sets that have already been found by the user
    4. Counts how many distinct sets the user has found, and congratulates the user for a WIN when all sets have been found
  2. Your project must use a GUI for game play. Your game's window(s) should be no larger than 1024 x 768 pixels, so your game can be easily displayed to the class using the projector. zellegraphics should be sufficient for developing the your GUI, but you are welcome to explore and use a different library (for example,  pygame) if you wish.
  3. We strongly encourage you to use top-down design, define some new classes (more on this below), or consult with your instructor on alternative design choices.
  4. All team members must contribute to and understand the project code. Exam 2 may include questions about your project.
  5. At the end of the project, each team member will evaluate the other members in terms of how well they contributed to the project; different team members may earn different project grades.

Most of the work on this  project will involve translating the rules provided into a functional design and implementation. There are not many requirements on how you must do this. This can be a double-edged sword. On the one hand you have a great deal of freedom in designing your solution; on the other hand we are giving very little specific guidance. If you are having trouble planning or getting started, get help. It is much better (and easier) to get help early and start off with a good plan than to try to hack a poor design into a semi-functional program in the final days before the project is due.

Project Teams

The project teams and repository information is posted here. Each member of your team should checkout your team repository at the start of the project. To minimize SVN conflicts, follow this routine with each editing session:

Using this cycle will minimize conflicts. If you get a conflict, get help from a member of the course staff to resolve it.

Remember to provide appropriate commit messages. We’ll be grading your proper use of SVN.

 

Each team member should contribute significantly to the code for your project.

Milestones

To make sure that you are on-track to complete your project, you must meet the following milestones. Each milestone will contribute to your overall project grade. Each milestone must be done before the specified class session.

Grading

Project grades will be based on both individual and group results. We may grade each project milestone, plus the final project program and presentation. Grading will include both the proper functioning of your program and an evaluation of your design, coding style, documentation, teamwork, and proper use of SVN.

Each team will be responsible for presenting and demonstrating their work to the class.

Each team member will be required to complete an evaluation survey about his or her own performance and that of each of his or her teammates. We will use these surveys and our own observations to assign individual project grades.

Some thoughts on Implementation

Displaying symbols on cards

You can duplicate the SET game's concepts without necessarily duplicating its exact appearance.  For example, the game's squiggle and oval shapes may be difficult to draw and fill. Feel free to substitute other distinctive shapes. 

IN the on-line game, the  shaded shapes are done by a bunch of diagonal lines.  Looks nice, but not easy to do.  (an interesting challenge for a motivated team).  You may want to simply fill the shape with a lighter version of the color that is used for the filed shape. You may find this page about available colors in TK (which zellegraphics uses) to be helpful.

Some classes that you might want to implement

Card:  Attributes of a card object might include where it is on the board, as well as the four attributed of a SET card (symbol, count, color, shading).  You will definitely want it to have a draw() method. 

Deck: Represents the cards that have not yet been dealt out to the board.  Initially this wil be all of the cards; as each card is placed ont the grid of 12 cards, it is removed from the deck.

A separate class  for each kind of Symbol, for the purpose of drawing and shading that kind of symbol:  Attributes of an object from one of these classes may include its color, degree of shading, and where it is to be drawn.  Perhaps each of these classes should have a draw() method. 

PossibleSet:  Includes a  collection (probably a list) of three cards.  This class should have a method that tests to see if the three cards form a set, and perhaps gives an indication of why they are not a set if they are not.   In addition to testing, objects from this class may be used to keep track of the SETs that the user has already found.

Use names instead of numbers in your code

You will probably want to have a number to represent each card attribute (e.g., 0 for red, 1 for green, 2 for purple. You should establish this relationship at the beginning of your code, and then use the names, not the numbers in subsequent code. This will make it easier for you, your teammates, and your instructor/lab assistants to understand what your code is doing. Here are some possible definitions that may help.

NUM_CHOICES = 3 # number of different colors, shades, shapes, symbols

NUM_CATEGORIES = 4 # the categories are colors, shades, shapes, symbols
RED = 100
GREEN = 101
PURPLE = 102
EMPTY = 200
SHADED = 201
FILLED = 202
OVAL = 300   # You may want different names if you use different symbols.
DIAMOND = 301
SQUIGGLE = 302

Suggestions

Enhancements

You are allowed to do enhancements for extra credit.  For example, you could implement the full two-player game in which SETs get removed and kept by players, and the cards that are removed get replaced from the deck.  You could animate some aspect of the game.  Talk to your instructor about potential enhancements that you may want to do, to get an idea of how much extra credit they could earn for your team.