-
Notifications
You must be signed in to change notification settings - Fork 236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CS2113-T13-4] TypingGame #36
base: master
Are you sure you want to change the base?
Changes from 223 commits
e94958e
8bcb483
5c976b8
e11f786
b896d26
6bdde74
31277b6
abdca64
1f78765
29e07fd
d5f493c
3630e89
78f1cf1
c644234
c2dd908
3701657
9ef90fd
2f1d9aa
0fbe8b3
38a9ffb
6c91086
f8d90b4
8af7397
f575d63
75d4558
32b8eb0
668b8a7
3f12892
c92eca1
eef514f
eb9983d
6f2fc9e
589b05d
4a167a9
ddf1f14
80329c0
bedfbef
2711cf3
72a8d18
8a36da6
e35ca2a
de55a0c
0160e7f
254b500
067a5e8
f2a547a
5c4bb29
da76407
3af64f7
1cb168f
500bbaf
4e275da
5460c83
3f83e2e
efcc35a
0324569
49ef03a
88038ef
b576641
1ac7d27
b1c51e5
cbe8508
e77e0e9
4ec260e
bfe56d1
edaf6c7
c2d4567
4df2d84
c59e1d8
a8fe453
fee453a
eb7a129
79fb64c
af32007
3d46031
56535cf
48c09e2
cfc6d1d
2d304df
5d6435d
ac9a903
d13dafe
4cca1ee
8712556
862002f
5ebafd8
b766e72
cd3326f
ba05501
a73c3b1
631013b
681fcb9
c4fc1fc
9ec35e7
463a265
aebc03e
15038e0
520f310
a1fd749
caaf670
63eb6d8
7ba7d8c
6f2ab04
5c2f9de
7d40d1f
4993646
be720db
7f7ea0e
be5eb01
26cda9e
9b17955
8038571
04e4fee
30214d8
e902feb
8670555
51d07ef
19e7c36
548c821
f02b898
e3fc454
64db187
89dd878
2d14673
672bc56
f859c7e
84dbb45
701c046
d7a84e8
9015df9
444e890
7a2e6f8
d6fe9f8
259c3ec
0db3108
d460dda
9eb4ab9
aa37f97
e59ec3f
90b3f13
58edbf1
7e87407
09ca4e3
bbafe12
9cd6ae0
4a76078
0a94bb6
4df460e
435ff62
7effb92
77975e4
6b743cb
8f74fe7
69e3ab9
d55313f
8d9a9aa
a71a944
4fef811
28b46c3
fb64a69
e88da31
38400d2
97c8e57
1e6e4d7
3de951d
7b9bc7b
f09e96b
04d4b4d
c8f677d
a8101d8
110584e
6aa98fa
dfaf463
642e4d2
7425022
b5287af
c477e24
33f4ac8
3926526
64a78b3
75846ba
2bdf0cc
5b68443
f3dd0ba
1357e11
7c896ca
51df91c
c5091c8
a491ec4
c1ea7ed
744c05d
b5c34aa
59c0cf7
bb65cc0
069a65d
c98ce89
02043d1
b6c96d6
b93c1ff
999cbad
f944e00
54e337b
7af5c21
69f51fe
5dde00f
7dbba21
de99568
b0b924a
972d7c4
17ffbe1
6f7b93d
b27fff7
fa9943e
0ef4a38
b5a8d5d
54db392
0be591a
3e5b89c
e043b1c
24d265f
f034dbd
8fce7b9
2abb6a7
bc97c18
efdc4e3
00cc43c
7392aa4
d3b47e6
d98b28f
bb5058d
51527ef
b25f239
b204b0a
762ad46
6351285
8a61e40
973a9cc
0857f1e
d81d08b
99f0354
dfefb74
22105e1
4f30a07
8d1ccf5
96a95c7
5efb119
a13b6a2
8805b42
59d829e
80a7826
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,96 @@ | ||
|
||
# Developer Guide | ||
* [Acknowledgements](#acknowledgements) | ||
* [Design & Implementation](#design-&-implementation) | ||
|
||
* [Acknoledgements](#acknowledgements) | ||
|
||
## Acknowledgements | ||
|
||
{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well} | ||
* https://www.baeldung.com/java-testing-system-out-println | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The link is now plain text. It should be wrapped with |
||
|
||
##Architecture | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Missing whitespace after There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
(Some architecture diagram) | ||
|
||
## Design & implementation | ||
|
||
{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.} | ||
|
||
### Choose game mode | ||
|
||
### Choose the game content | ||
|
||
### Word Limit Game | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
Once the CommandFactory reads a 'word' command, a word limit game will begin. | ||
|
||
Gonna to change this .puml diagram later - zhansen | ||
|
||
![](uml/WordLimitMode.png) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be better to use vector graphics such as SVG, which displays nicely even on the dark background you choose? It would be better to just link to an online one that renders the diagram. This has the following benefits of reducing binary blobs in the repo. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
### Time Limit Game | ||
Sequence Diagram for Time Mode Game: | ||
![image](https://user-images.githubusercontent.com/69776265/139190231-eb648329-517b-42dc-a088-fbce5c93c616.png) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly, are the return arrows supposed to show return values or method calls? If it is return values, the arrow should be dotted here |
||
### \[Proposed\] View Statistics feature | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
#### \[Proposed Implementation\] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
The top-level logic of view statistics feature resides in ViewCommand. It implements the Command | ||
interface. The key method of the class is `executeCommand()`. | ||
`executeCommand()` logic: | ||
1. Calls the retrieveStatistics() method of StatisticsManager to get the statistics. | ||
2. Calls the displayStatistics() method of ViewCommandUi to display the statistics retrieved. | ||
<!-- --> | ||
StatisticsManager performs the logic for processing the game records to obtain the statistics. | ||
Its key methods are: | ||
* `retrieveStatistics()` - Decides which of the three methods below to run | ||
* `calculateBestStatistics()` - Returns the best statistics over the past n games | ||
* `calculateWorstStatistics()` - Returns the worst statistics over the past n games | ||
* `calculateAverageStatistics()` - Returns the average statistics over the past n games | ||
<!-- --> | ||
Given below is an example usage scenario and how the program implements the feature. | ||
|
||
Step 1: The user launches the application (scenario assumes that there are several game records already stored in multiple files). | ||
|
||
Step 2: The user executes `view -m best -g time -n 9` to view his/her best statistics for the error game mode over the past 9 games. | ||
|
||
Step 3: A ViewCommand object is then instantiated. | ||
|
||
![Alt text](uml/ViewStatistics-1.drawio.svg) | ||
|
||
Step 4. ViewCommand calls the retrieveStatistics() method of StatisticsManager. | ||
![Alt text](uml/ViewStatistics-2.drawio.svg) | ||
|
||
Step 5: StatisticsManager creates a GameRecordsManager object. | ||
* The constructor of GameRecordsManager calls the readGameRecords() method of the Storage class to retrieve the gamer's past game records from the text files. | ||
<!-- --> | ||
![Alt text](uml/ViewStatistics-3.drawio.svg) | ||
Step 6. StatisticsManager then calls getGamesRecords() method of GameRecordsManager() and self-invokes calculateBestStatistics(). | ||
* Calculated statistics is returned. | ||
|
||
Step 7. ViewCommand calls the displayStatistics() method of the ViewCommandUi class to display the statistics. | ||
![Alt test](uml/ViewStatistics-4.drawio.svg) | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
The following sequence diagram shows how the above scenario is executed. | ||
![Alt test](uml/ViewStatistics-5.drawio.svg) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
|
||
|
||
|
||
#### Alternative Implementation | ||
* One implementation considered is to do away with the retrieveStatistics() method and immediately call one of calculateBestStatistics, | ||
calculateWorstStatistics() or calculateAverageStatistics() based on the gamer's imput using a switch statement. This implementation choice | ||
was not used because it violates the Single Responsibility Principle and does not do SLAP well. | ||
* Another implementation considered was for GameRecordsManager to do the main logic. This implementation was not done as it violates the | ||
Single Responsibility Principle. | ||
<!-- --> | ||
|
||
## Product scope | ||
|
||
Our product is a typing game, intent to provide enjoyment for people who are familiar with the CML. | ||
|
||
|
||
### Target user profile | ||
|
||
{Describe the target user profile} | ||
|
@@ -28,6 +109,8 @@ | |
## Non-Functional Requirements | ||
|
||
{Give non-functional requirements} | ||
### Animation | ||
|
||
|
||
## Glossary | ||
|
||
|
@@ -36,3 +119,4 @@ | |
## Instructions for manual testing | ||
|
||
{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing} | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
theme: jekyll-theme-hacker |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Lim Jia Jing - Project Portfolio Page | ||
|
||
## Overview | ||
|
||
|
||
### Summary of Contributions |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Lu Sicheng - Project Portfolio Page | ||
|
||
## Overview | ||
|
||
|
||
### Summary of Contributions |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sections should be numbered and the table of content should be included.