Assignment 9: Third Time’s a Charm – Three Trios, part 5
1 Level 0:   Showing scoring hints
2 Level 1:   Variant Rule Set 1
3 Level 2:   Variant Rule Set 2
4 Level 3:   Combining Both Sets of Variant Rules
5 Evaluation
6 Grading standards
8.9

Assignment 9: Third Time’s a Charm – Three Trios, part 5

Due dates:

There is no self-eval for this assignment, though you will still submit it on the handin server. For evaluation, you will schedule a brief demo with one of the instructional staff. Available time slots will be posted on a Google document with a link on Piazza.

We prefer you complete this assignment with your partner, but if you need to work on it on your own, contact us in advance. We strongly prefer that you present your work together with your partner. If only one of you can attend, you must let us know in advance.

This assignment asks you to implement four sets of features for four levels of extra credit. The levels are somewhat dependent, and also increase in difficulty. Each level is all-or-none: either it works perfectly or it doesn’t. However there are points in each level for designing well, in addition to working correctly.

All extra-credit functionality must be well-designed and tested, to the ability of that feature to be tested. (GUI functionality is hard to test directly, but any related interfaces or classes must be testable and tested.) Also, all extra-credit functionality must work simultaneously: you must not have to comment code out and recompile your program in order to enable different features. You may use different command-line arguments, toggleable menu items, or other UI choices to select among your features.

1 Level 0: Showing scoring hints

As an assist to players, enable a “hint” mode where once the current player selectes a card, each card cell on the grid shows how many cards would be flipped if that card was played on that cell.

Below are examples of hints for the red player that change

Middle card chosen

    

Bottom card chosen

    

Hints must be enableable and disableable at runtime, and for each player independently: you should not have to restart the game to turn hints on or off, and (obviously!) hints for one player should not be shown to the other player. For proper design, you must not modify your rendering code directly to add these hints; it must be a separate decoration that you can add or remove.

2 Level 1: Variant Rule Set 1

In this level, you will reimplement a model that allows for the following variant battle rules to take effect, possibly at the same time. These rules change how the attack values result in capture.

Note that when both are applied, this means an A can beat a 1 (because that is the Reverse of the Fallen Ace rule).

These variant rule sets must be applied on the command line. If none are given, the unmodified version of the game is played.

For proper design, both your variant model and your regular model must implement the same model interface(s), and must coexist in your code without e.g. commenting one out and recompiling the other. As with all models, this must be decently tested. Furthermore, you cannot simply make models for all combinations. We have better design patterns we can apply in this case to make for a cleaner design.

3 Level 2: Variant Rule Set 2

In this level, you will reimplement a model that allows for two additional variant battle rules to take effect, but NOT at the same time as each other because they change the criteria under which cards are flipped. For ease, these rules only apply before the combo step. Further note that if two cards match the criteria below, but one of them already belongs to the current player, then only the opponent’s card is flipped.

These variant rule sets must be applied on the command line. If none are given, the unmodified version of the game is played.

For proper design, both your variant model and your regular model must implement the same model interface(s), and must coexist in your code without e.g. commenting one out and recompiling the other. As with all models, this must be decently tested. Furthermore, you cannot simply make models for all combinations. We have better design patterns we can apply in this case to make for a cleaner design.

4 Level 3: Combining Both Sets of Variant Rules

In this level, you must modify your design such that someone can play a game with one or both of the variant rules from Set 1 alongside exactly one of the variant rules from Set 2. If you designed the previous levels well, this will be trivial. Note for this level, that means both levels 1 and 2 must both work flawlessly and have a proper design to even get credit.

Proper design should allow you to essentially decorate the model or pass in how to perform the variant rules. This new model design must also be decently tested.

5 Evaluation

You will demo your work to the instructional staff. Please come to your demo slot prepared. You should not have to modify your source code during the demo to demonstrate features (e.g. if you have all four levels working, but you must comment them in or out to demonstrate them, that is not acceptable). Re-running your program with different command-line options to show different levels is acceptable.

You will explain the architectural changes you made to the instructor or TA who is grading you.

You will submit your code to the handin server before you are scheduled for your demo. Please include a readme file explaining which features you implemented and which files were affected, so the grader can quickly orient themselves when you arrive.

6 Grading standards

This assignment will be graded out of a total of 12 points:

Each of these individual grade items are all-or-none. In particular, clean code that is not properly functioning will not receive those points; likewise correctly functioning code that is poorly designed will not receive those points. As stated above, to receive credit for a feature, it must work completely. Two half-finished feature levels are worth zero points. Focus your attention on making each part of this assignment work well, rather than spreading yourselves too thin across several incomplete features.