diff --git a/DESIGN.md b/DESIGN.md index b581809..51d0752 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -1,47 +1,86 @@ CompSci 308 : RPS Design =================== -> This is the link to the Lab Description: +* Timothy Blumberg +* Madhav Kumar +* Shae von Wagoner +tsb20, mrk33, csv5 + +> This is the link to the Lab Description: [Lab - RPS](http://www.cs.duke.edu/courses/compsci308/spring16/classwork/02_design_rps/index.php) -Initial Design -======= +# Class List + +# Weapon + This class stores each Weapon's unique identifier + +### Data + * `private int index; // must be unique` + * `private String name;` + +### Methods + * `public int getIndex();` + * `public String getName();` + +# WeaponManager + Coordinates the relationships between Weapons + +### Data + * `private final Matrix relationships;` -###Class 1 +### Methods + * `public boolean score(Weapon w1, Weapon w2);` + * `public int getNumWeapons();` + * `public List getWeaponList();` -* Bullets are made with asterisks +# Main + Provide overarching program structure, connecting all the little pieces -1. You can also order things with numbers +### Methods + * `public void startGame();` +# Player +Manages individual player actions -###Class 2 +### Data + * `private Weapon activeWeapon;` + * `private int score;` +### Methods + * `public Weapon getActiveWeapon;` + * `public void setActiveWeapon;` + * `public int getScore;` + * `public void setScore;` -CRC Design -======= +# Data Description -###Class 1 +Store Weapon relationships as 2x2 integer matrix. The coordinates of values will be indexed by `(Player A's Weapon, Player B's Weapon)` matrix will be setup such that values in the table will be from the perspective of `Player A`. +Weapons will need to be individually indexed such that they have a unique row/colum position to be found -###Class 2 -You can add images as well: +# Use Cases -![This is cool, too bad you can't see it](crc-example.png "Our CRC cards") +## New Game is started +* Loop + * Players select Weapons + * score(p1.getWeapon(), p2.getWeapon()) + * players update scores +## Chooses Weapons +* player.setWeapons(w1); -Use Cases -======= +## Players confront each other +* if player 1's weapons beats player 2's + * score player 1 +* else + * score player 2 -You can put blocks of code in here like this: -```java - public int getTotal (Collection data) { - int total = 0; - for (int d : data) { - total += d; - } - return total; - } -``` +## New weapons +* Add new rows and columns to WeaponManager matrix based on input file +## New Game is added with different weapons +* Create new WeaponManager for this new Game +* Reset player scores +* Prompt new Weapons choices from players.