From a4ad912beb440cb8305bb2b673f1b91b991b4ccc Mon Sep 17 00:00:00 2001 From: Sophie Guo Date: Thu, 21 Jan 2016 17:48:04 -0500 Subject: [PATCH] Added design --- DESIGN.md | 61 +++++++++++++++++++++++++------------------------------ 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/DESIGN.md b/DESIGN.md index b581809..fd09f6d 100644 --- a/DESIGN.md +++ b/DESIGN.md @@ -1,47 +1,42 @@ -CompSci 308 : RPS Design +RCP =================== -> 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 1 +Class 1 - Main +---------- +Implements the game -* Bullets are made with asterisks -1. You can also order things with numbers +Class 2 - Relationship +---------- +private Map relation +public void readData(Collection data) +public int beat(Object o1, Object o2): check if o1 beats o2 +public void addWeapon( Collection Object A, Object O, Collection B): add a new weapon O that gets beaten by A and beats B -###Class 2 +Class 3 - Players +---------- +private double scores +private String weapon +private String name +public double getScore() +public void setScore() +public Object getWeapon() +public void changeWeapon(Object o) -CRC Design -======= -###Class 1 +Class 4 - PRSGame +---------- +private Relationship myRelationship +private Players p1,p2 - -###Class 2 - -You can add images as well: - -![This is cool, too bad you can't see it](crc-example.png "Our CRC cards") - - -Use Cases -======= - -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; - } -``` +public void init() //initialize the game +public void round() +public void end() +public Player getWinner() +public void restart()