-
Notifications
You must be signed in to change notification settings - Fork 232
[CS2113-T13-4] TypingGame #36
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
base: master
Are you sure you want to change the base?
Changes from 163 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,41 @@ | ||
| # Developer Guide | ||
|
|
||
| * [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 | ||
|
|
||
|  | ||
|
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 | ||
|
|
||
| ### Storage | ||
|
|
||
| ## 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 +54,8 @@ | |
| ## Non-Functional Requirements | ||
|
|
||
| {Give non-functional requirements} | ||
| ### Animation | ||
|
|
||
|
|
||
| ## Glossary | ||
|
|
||
|
|
||
| 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 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| # Shi Zhansen - Project Portfolio Page | ||
|
|
||
| ## Overview | ||
|
|
||
|
|
||
| ### Summary of Contributions | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,69 @@ | ||
| @startuml | ||
|
|
||
| [-> SearchCommand : execute() | ||
| activate SearchCommand | ||
|
|
||
| alt Able to connect | ||
| SearchCommand -> NusMods : searchModsOnline() | ||
| activate NusMods | ||
| NusMods -> NusMods : getOnlineModList() | ||
| activate NusMods | ||
| NusMods --> NusMods | ||
| deactivate NusMods | ||
| loop for each mod | ||
| alt Module Code Match | ||
| NusMods -> NusMods : fetchModOnline() | ||
| activate NusMods | ||
| NusMods -> NusMods : getOnlineModInfo() | ||
| activate NusMods | ||
| NusMods --> NusMods | ||
| deactivate NusMods | ||
| NusMods -> ModStorage : saveModInfo() | ||
| activate ModStorage | ||
| ModStorage --> NusMods | ||
| deactivate ModStorage | ||
| NusMods -> ModStorage : loadModInfo() | ||
| activate ModStorage | ||
| ModStorage --> NusMods | ||
| deactivate ModStorage | ||
| deactivate NusMods | ||
| alt All Flags Match | ||
| NusMods -> TextUI : PrintModBriefDescription() | ||
| activate TextUI | ||
| TextUI --> NusMods | ||
| deactivate TextUI | ||
| else | ||
| end | ||
| else | ||
| end | ||
| end | ||
| NusMods --> SearchCommand | ||
| deactivate NusMods | ||
|
|
||
| else No connection or Quicksearch | ||
|
|
||
| SearchCommand -> ModStorage : searchFiles() | ||
| activate ModStorage | ||
| loop for each json | ||
| alt Module Code Match | ||
| ModStorage -> ModStorage : loadModInfo() | ||
| activate ModStorage | ||
| ModStorage --> ModStorage | ||
| deactivate ModStorage | ||
| alt All Flags Match | ||
| ModStorage -> TextUI : PrintModBriefDescription() | ||
| activate TextUI | ||
| TextUI --> ModStorage | ||
| deactivate TextUI | ||
| end | ||
| end | ||
| end | ||
| ModStorage --> SearchCommand | ||
| deactivate ModStorage | ||
|
|
||
| end | ||
|
|
||
| <-- SearchCommand | ||
| deactivate SearchCommand | ||
|
|
||
| @enduml |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
|
|
||
| Oct 26, 2021 11:21:51 PM seedu.typists.ui.SummaryUi setUpLog | ||
|
|
||
| INFO: Set up log in TextUi |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| package seedu.typists; | ||
|
|
||
| import seedu.typists.content.Content; | ||
| import seedu.typists.command.Command; | ||
| import seedu.typists.command.CommandFactory; | ||
| import seedu.typists.ui.TextUi; | ||
|
|
||
| import seedu.typists.storage.Storage; | ||
|
|
||
| import java.util.ArrayList; | ||
| import java.util.Arrays; | ||
| import java.util.Scanner; | ||
|
|
||
|
|
||
| public class Main { | ||
| /** | ||
| * Version info of the program. | ||
| */ | ||
| public static final String VERSION = "Typist - Version 1.0"; | ||
| public static final int LINE_LENGTH = 10; | ||
| public static Content content; | ||
| public static TextUi uiBot; | ||
| Storage storage; | ||
|
|
||
|
|
||
| public Main() { | ||
| uiBot = new TextUi(); | ||
| this.storage = new Storage(); | ||
| content = new Content(); | ||
| } | ||
|
|
||
| public void start() { | ||
| uiBot.showWelcomeMessage(VERSION); | ||
| } | ||
|
|
||
| public String read() { | ||
| Scanner sc = new Scanner(System.in); | ||
| return sc.nextLine(); | ||
| } | ||
|
|
||
| public void runCommandLoop() { | ||
| CommandFactory cmdFactory = new CommandFactory(); | ||
| String command; | ||
| ArrayList<String> args; | ||
| do { | ||
| String[] input = read().split(" "); | ||
| command = input[0]; | ||
| args = new ArrayList<String>(Arrays.asList(Arrays.copyOfRange(input,1,input.length))); | ||
| Command c = cmdFactory.getCommand(input[0]); | ||
| if (c != null) { | ||
| c.run(args); | ||
| } | ||
| } while (!command.equals("bye")); | ||
| } | ||
|
|
||
| public void exit() { | ||
| } | ||
|
|
||
| /** | ||
| * Runs the program until termination. | ||
| */ | ||
| public void run() { | ||
| start(); | ||
| runCommandLoop(); | ||
| } | ||
|
|
||
| /** | ||
| * Main entry-point for the java.duke.Duke application. | ||
| */ | ||
| public static void main(String[] args) { | ||
| new Main().run(); | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| package seedu.typists.command; | ||
|
|
||
| import java.util.ArrayList; | ||
|
|
||
| public interface Command { | ||
| void run(ArrayList<String> args); | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| package seedu.typists.command; | ||
|
|
||
| import seedu.typists.ui.TextUi; | ||
|
|
||
| public class CommandFactory { | ||
| TextUi ui = new TextUi(); | ||
|
|
||
| public Command getCommand(String commandType) { | ||
| switch (commandType) { | ||
| case "time": | ||
| return new TimeGameCommand(); | ||
| case "word": | ||
| return new WordGameCommand(); | ||
| case "content": | ||
| return new ContentCommand(); | ||
| case "error": | ||
| return new ErrorCommand(); | ||
| case "bye": | ||
| return new ExitCommand(); | ||
| default: | ||
| ui.printScreen("invalid command"); | ||
| return null; | ||
| } | ||
| } | ||
| } |



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.