Skip to content
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-F15-3] NUSFC 24 #57

Open
wants to merge 266 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 142 commits
Commits
Show all changes
266 commits
Select commit Hold shift + click to select a range
60478ee
Merge pull request #16 from HenryGan138/branch-v1.0UiMain
HenryGan138 Mar 15, 2024
8da0ae3
Add directionIsLegal JUnit Test
Mar 15, 2024
4bf1c74
Merge pull request #21 from runxinghuan/branch-JUnit-Test
runxinghuan Mar 15, 2024
b055ba2
viewGoal and goalCheck
Mar 15, 2024
493305f
Merge branch 'master' into my-branch
ymirmeddeb Mar 15, 2024
d6f73e9
Merge branch 'master' into Dev-Info
IncyBot Mar 15, 2024
027ada1
Merge pull request #3 from IncyBot/Dev-Info
IncyBot Mar 15, 2024
7d3367e
Merge branch 'master' into my-branch
ymirmeddeb Mar 15, 2024
4866d97
Merge pull request #22 from ymirmeddeb/my-branch
ymirmeddeb Mar 15, 2024
974f918
Add UiTest for v1.0
JiahaoGan Mar 15, 2024
c4d0ff7
Merge pull request #23 from HenryGan138/branch-v1.0UiMain
HenryGan138 Mar 15, 2024
cd2a1f8
Enable assertions
Mar 18, 2024
1d71879
Merge pull request #25 from runxinghuan/branch-Enable-Assertion
runxinghuan Mar 19, 2024
c2149ff
Solve three checkstyle errors
Mar 19, 2024
d630fea
Merge pull request #27 from runxinghuan/branch-Fix-Checkstyle
runxinghuan Mar 19, 2024
4db3129
Change the expected output for text ui test
Mar 19, 2024
f33eaeb
Merge pull request #29 from runxinghuan/branch-Text-Ui-Test
runxinghuan Mar 19, 2024
ec208e1
Make the Ai class more defensive using assert
Mar 19, 2024
d795caf
Merge pull request #31 from runxinghuan/branch-More-Defensive
runxinghuan Mar 19, 2024
04478ae
Add Parser
hwc0419 Mar 20, 2024
3703187
Merge pull request #36 from AY2324S2-CS2113-F15-3/branch-Parser
hwc0419 Mar 20, 2024
f21663a
no message
Mar 21, 2024
f92d83a
Merge pull request #37 from ymirmeddeb/my-branch
ymirmeddeb Mar 21, 2024
6942743
added added assert and logging to printGoalBeforeShot and printGoalAf…
Mar 21, 2024
e54019c
Merge pull request #38 from ymirmeddeb/my-branch
ymirmeddeb Mar 21, 2024
f853927
Edition to the Duke
JiahaoGan Mar 21, 2024
d19af39
Merge pull request #40 from HenryGan138/master
HenryGan138 Mar 21, 2024
0253006
Slight change 2 on v1.0b
JiahaoGan Mar 21, 2024
2cf5f83
Revert "Slight change 2 on v1.0b"
JiahaoGan Mar 21, 2024
a067072
Reformat code
hwc0419 Mar 21, 2024
0aa7772
Revert "Edition to the v1.0b"
HenryGan138 Mar 21, 2024
624fbba
Merge pull request #45 from AY2324S2-CS2113-F15-3/revert-40-master
HenryGan138 Mar 21, 2024
a461380
Add Assert into goalcheck
JiahaoGan Mar 21, 2024
da05874
Merge branch 'branch-Parser'
hwc0419 Mar 21, 2024
6730c33
Add logging into Ui
JiahaoGan Mar 21, 2024
e396054
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F15-3/tp
hwc0419 Mar 21, 2024
573e992
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F15-3/tp …
JiahaoGan Mar 21, 2024
7a6dad4
Merge pull request #50 from HenryGan138/branch-v1.0b-assert
HenryGan138 Mar 21, 2024
327b3d1
Package exceptions
hwc0419 Mar 21, 2024
8055a17
Merge pull request #51 from hwc0419/branch-Parser
hwc0419 Mar 21, 2024
7e4a8f8
Added Shoot Function
IncyBot Mar 21, 2024
ecd18a6
Added Penalty Command
IncyBot Mar 21, 2024
1d2f084
Merge pull request #52 from IncyBot/Dev-Info
IncyBot Mar 21, 2024
f941bfa
Add ParserTest for v1.0
hwc0419 Mar 21, 2024
1272750
Merge pull request #53 from hwc0419/branch-Parser
hwc0419 Mar 21, 2024
e7b33ad
Add assert and logging to Parser
hwc0419 Mar 21, 2024
da618f1
Merge pull request #54 from hwc0419/branch-Parser
hwc0419 Mar 21, 2024
7d34bf5
Code quality
hwc0419 Mar 22, 2024
aba4108
Merge branch 'branch-CodeQuality-v1'
hwc0419 Mar 22, 2024
0e9765c
Merge pull request #59 from hwc0419/branch-CodeQuality-v1
hwc0419 Mar 23, 2024
4570814
Delete text ui test
Mar 24, 2024
30011f4
Week 9 Tutorial work
JiahaoGan Mar 24, 2024
da02edb
Merge branch 'branch-v1.0b-assert'
JiahaoGan Mar 24, 2024
1f2fe0e
Merge remote-tracking branch 'tpmaster/master'
JiahaoGan Mar 24, 2024
6b37cc4
Add Duke Class back
JiahaoGan Mar 24, 2024
b2e3050
Remove the command to run text ui test
Mar 24, 2024
1615467
Merge pull request #61 from runxinghuan/branch-Delete-Text-ui-test
runxinghuan Mar 24, 2024
a82f5b9
Removed Shot Functionality for Penalty
IncyBot Mar 24, 2024
a490c06
Add real penalty shootout setting
Mar 25, 2024
5a51e28
Design the Shooter Class as the parent Class
JiahaoGan Mar 25, 2024
fc366f4
Beginner, Meidum, ExpertSkill class all implements Shooter Class func…
JiahaoGan Mar 25, 2024
0dbf2c0
ArrayList manage the Shooter Class (for polymorphism implementation l…
JiahaoGan Mar 25, 2024
7f4da88
Add upgrade command
JiahaoGan Mar 25, 2024
96e4833
V2.0 Test1
JiahaoGan Mar 25, 2024
638ae62
Edit the code based on Hao Wen's comments
Mar 26, 2024
8cf467f
added penalty saving functionnality
Mar 26, 2024
04c34c8
Merge pull request #66 from ymirmeddeb/my-branch
ymirmeddeb Mar 26, 2024
c9d1d1e
Revert "Save Penalty"
runxinghuan Mar 26, 2024
3b89f0b
Merge pull request #67 from AY2324S2-CS2113-F15-3/revert-66-my-branch
runxinghuan Mar 26, 2024
9422af4
added penalty saving functionnality
Mar 26, 2024
d36d6fd
Updated as per comments
IncyBot Mar 26, 2024
293ec06
Merge pull request #64 from runxinghuan/branch-Shootout-Setting
runxinghuan Mar 26, 2024
a66467c
Updated next line issue
IncyBot Mar 26, 2024
71cde74
Add explanation to one of my feature added
Mar 26, 2024
d6370d7
Merge branch 'master' into Dev-Info
IncyBot Mar 26, 2024
aa9e5ad
Merge pull request #63 from IncyBot/Dev-Info
IncyBot Mar 26, 2024
0b39546
Added Difficulty Levels
IncyBot Mar 26, 2024
c0cda27
Minor change to improve the code
JiahaoGan Mar 26, 2024
2d35c7f
Merge remote-tracking branch 'tpmaster/master'
JiahaoGan Mar 26, 2024
84315a9
Change for compiling error
JiahaoGan Mar 26, 2024
4c648f4
Merge branch 'master' into branch-v2.0
JiahaoGan Mar 26, 2024
7ba78fe
Implement Automatically update player function
JiahaoGan Mar 26, 2024
315a7f4
Improve the code of player class
JiahaoGan Mar 26, 2024
b922d9b
Connect MatchStat with the player class
JiahaoGan Mar 26, 2024
98a8ef8
Changes to implement V2.0
JiahaoGan Mar 26, 2024
da29dc9
workflows
JiahaoGan Mar 26, 2024
1a469f0
Merge pull request #72 from HenryGan138/branch-v2.0-t1
HenryGan138 Mar 27, 2024
6b8f502
Add a class diagram for MatchStat class
Mar 28, 2024
47608dc
Try to makes the UML diagram visible
Mar 28, 2024
cedc563
Try to make the UML diagram visible
Mar 28, 2024
c345b5e
Another try
Mar 28, 2024
e4ca8b1
Try to show the diagram using copy and paste
Mar 28, 2024
f3efe97
Merge branch 'branch-UG-1' of https://github.com/runxinghuan/tp into …
Mar 28, 2024
fcbb2f3
Update to DG
JiahaoGan Mar 28, 2024
7651670
Merge branch 'branch-DGv1' into branch-v2.0-t1
JiahaoGan Mar 28, 2024
01313fc
Merge pull request #75 from HenryGan138/branch-v2.0-t1
HenryGan138 Mar 28, 2024
b33e5b5
Update DeveloperGuide.md
IncyBot Mar 28, 2024
2fb603b
Merge branch 'master' of https://github.com/IncyBot/tp
IncyBot Mar 28, 2024
a35bbc9
Merge branch 'Dev-Info'
IncyBot Mar 28, 2024
0a6ab1f
Merge pull request #76 from IncyBot/master
IncyBot Mar 28, 2024
11ed480
Merge branch 'master' into branch-UG-1
runxinghuan Mar 29, 2024
1bfa106
Merge pull request #70 from runxinghuan/branch-UG-1
runxinghuan Mar 29, 2024
ef78563
Merge branch 'master' into my-branch
runxinghuan Mar 29, 2024
d33aee0
Merge pull request #68 from ymirmeddeb/my-branch
runxinghuan Mar 29, 2024
5769043
added save class to developer guide
Mar 29, 2024
39a6839
Merge pull request #77 from ymirmeddeb/my-branch
ymirmeddeb Mar 29, 2024
3e675e7
Change the author of the MatchStat class
Mar 29, 2024
ae8244d
Merge pull request #78 from runxinghuan/branch-Change-Author
runxinghuan Mar 29, 2024
4989634
Improve the MatchStat class
Mar 29, 2024
4dedce9
Add header comments for MatchStat class
Mar 29, 2024
f757679
Merge pull request #79 from runxinghuan/branch-Improve-Shootout-Setting
runxinghuan Mar 29, 2024
979ad42
Enables player and Ai to take turn to shoot
Mar 30, 2024
455230b
Merge pull request #81 from runxinghuan/branch-take-turns
runxinghuan Mar 30, 2024
f3c8fa9
fix Save class
Mar 30, 2024
dc79cf5
Fix a small bug in updating the score
Mar 30, 2024
020bc89
fix save command
Mar 31, 2024
756f0cb
no message
Mar 31, 2024
4f6b975
Merge pull request #84 from ymirmeddeb/my-branch
runxinghuan Mar 31, 2024
55645ce
Merge pull request #83 from runxinghuan/branch-take-turns
runxinghuan Mar 31, 2024
0f6f694
Fix a few bugs
Mar 31, 2024
5619107
Merge pull request #85 from runxinghuan/branch-v2.0-bug-fix
runxinghuan Mar 31, 2024
0725840
Add introduction and quick start parts of the UG
Mar 31, 2024
53df0c7
Merge pull request #88 from runxinghuan/branch-UG-v2.0
runxinghuan Mar 31, 2024
e93e459
TestCoverage
JiahaoGan Mar 31, 2024
800306b
Merge branch 'master' into branch-v2.0
JiahaoGan Mar 31, 2024
ecebe8a
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F15-3/tp …
JiahaoGan Mar 31, 2024
4935fa5
MInor change to pull mistakes on update command
JiahaoGan Mar 31, 2024
7266669
Ymir edit UG for save command and delete Save class
Apr 1, 2024
8ea78df
Update the class diagram for MatchStat
Apr 1, 2024
c0fe42f
Add sequential diagram of MatchStat class to the DG
Apr 1, 2024
5889b69
Improve the visual effect of the game
JiahaoGan Apr 2, 2024
b046576
Add OOP function to implement shoot function concern power and diffic…
JiahaoGan Apr 2, 2024
d1b5af1
Adapt shoot direction from 0-2 to 0-8
JiahaoGan Apr 2, 2024
a241af8
Rename the function to make it more understandable
JiahaoGan Apr 2, 2024
057d510
Change to DG
JiahaoGan Apr 2, 2024
4e4605f
Change to UG
JiahaoGan Apr 2, 2024
9a06353
Merge pull request #91 from runxinghuan/branch-DG-Sequential-Diagram
runxinghuan Apr 3, 2024
933ea62
Minor changes on code quality
JiahaoGan Apr 3, 2024
335a522
Fix class name for player class
JiahaoGan Apr 3, 2024
4768731
Merge remote-tracking branch 'tpmaster/master'
JiahaoGan Apr 3, 2024
da5685a
Merge branch 'master' into branch-v2.0c
JiahaoGan Apr 3, 2024
dac68d0
Merge pull request #101 from HenryGan138/branch-v2.0c
HenryGan138 Apr 3, 2024
0abe9bb
Merge pull request #89 from ymirmeddeb/my-branch
runxinghuan Apr 4, 2024
cb88d82
Add coin toss feature
Apr 5, 2024
7ca8b56
Add coin toss feature
Apr 5, 2024
7c6a87e
Add header comments to newly added coin toss methods
Apr 6, 2024
40df115
Merge pull request #102 from runxinghuan/branch-Toss-Coin
runxinghuan Apr 7, 2024
c90f3fd
added skill and power upgrading to the saver
Apr 7, 2024
1112dbb
Merge pull request #161 from ymirmeddeb/my-branch
ymirmeddeb Apr 7, 2024
d118db2
fix minor bug for save command
Apr 7, 2024
fc94dd8
minor bug in save command
Apr 7, 2024
aa1b323
Change magic numbers in MatchStat to constants
Apr 7, 2024
05d92bb
Merge pull request #163 from runxinghuan/branch-Fix-Magic-Number-Matc…
runxinghuan Apr 7, 2024
6df87a3
Change a few DG bugs
Apr 8, 2024
4a92a89
Merge pull request #164 from runxinghuan/branch-DG-bug
runxinghuan Apr 8, 2024
8c865fb
Added ability to create teams
IncyBot Apr 8, 2024
c8b828a
Added customization and ability to use coins for skills
IncyBot Apr 8, 2024
cd2ff7c
Updated commands to match with player customizations
IncyBot Apr 8, 2024
74a0500
Improve player skill illustration in UG
JiahaoGan Apr 9, 2024
1bec64c
Merge pull request #166 from HenryGan138/branch-v2.1
HenryGan138 Apr 9, 2024
efbbc60
Improve on the explanation of best-of-five kicks rule
Apr 10, 2024
85d07a9
Add unit tests for MatchStat
Apr 10, 2024
8b019fb
Add unit tests for CoinToss
Apr 10, 2024
908652d
Merge pull request #167 from runxinghuan/branch-UG-bug
runxinghuan Apr 10, 2024
30e8ff0
Merge pull request #168 from runxinghuan/branch-More-Test
runxinghuan Apr 10, 2024
40371c1
Add PPP draft for Xinghuan
Apr 11, 2024
c6bb25d
Merge pull request #169 from runxinghuan/branch-PPP
runxinghuan Apr 11, 2024
7e6f053
Jiahao Gan PPP draft one
JiahaoGan Apr 11, 2024
9a390d7
fix direction numbers in beginner and medium level saver
Apr 11, 2024
7f3a448
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F15-3/tp …
Apr 11, 2024
887752e
Merge pull request #170 from HenryGan138/branch-v2.1
HenryGan138 Apr 11, 2024
82a9977
Merge pull request #165 from IncyBot/Dev-Info
runxinghuan Apr 11, 2024
eb1f52f
implement help function
Apr 11, 2024
e659e1a
Merge branch 'master' into my-branch
ymirmeddeb Apr 11, 2024
93f9c83
Merge pull request #162 from ymirmeddeb/my-branch
ymirmeddeb Apr 11, 2024
28203e8
remove logging
Apr 11, 2024
748929c
Merge pull request #171 from ymirmeddeb/my-branch
ymirmeddeb Apr 11, 2024
6e42292
UG for shoot command
Apr 11, 2024
c8e5ae8
minor aesthetic changes
Apr 12, 2024
527a4e2
Create ymirmeddeb.md
ymirmeddeb Apr 12, 2024
cf9c623
Merge branch 'master' of https://github.com/AY2324S2-CS2113-F15-3/tp …
Apr 12, 2024
b2f0dfd
PPP draft one
Apr 12, 2024
3e78e65
Merge pull request #172 from ymirmeddeb/my-branch
ymirmeddeb Apr 12, 2024
864a0fe
attempt to fix command bug and UG for all commands
Apr 12, 2024
d0bd790
Block certain commands at certain stages
Apr 12, 2024
4e038f0
remove incorrect fix for commands out of phase
Apr 12, 2024
f614c9e
Merge pull request #173 from ymirmeddeb/my-branch
ymirmeddeb Apr 12, 2024
e3d5e77
Merge pull request #176 from runxinghuan/branch-Fix-Invalid-Command
ymirmeddeb Apr 12, 2024
6d404c2
Added JUnit Test for Player
IncyBot Apr 12, 2024
b7ae8bf
Added PPP for IncyBot
IncyBot Apr 12, 2024
ac0b964
Merge pull request #177 from IncyBot/Dev-Info
IncyBot Apr 12, 2024
90fd8c4
Make CoinToss more OO
Apr 12, 2024
4c132ee
Merge pull request #178 from runxinghuan/branch-CoinToss-More-OO
runxinghuan Apr 13, 2024
36c93d4
Rename the class name from Duke to NUSFC
Apr 13, 2024
bf7e8ba
Change command "upgrade" into "setpower"
JiahaoGan Apr 13, 2024
5933f00
Change "set" in UG
JiahaoGan Apr 13, 2024
f59752c
Merge pull request #180 from HenryGan138/branch-v2.1a
HenryGan138 Apr 13, 2024
2f1b954
Merge pull request #179 from runxinghuan/branch-Rename
runxinghuan Apr 13, 2024
443cb82
Rename from Duke to NUSFC
JiahaoGan Apr 13, 2024
d00cbf5
Merge remote-tracking branch 'tpmaster/master' into branch-v2.1a
JiahaoGan Apr 13, 2024
55c2bb6
Update and minor edit change in UG shoot command
JiahaoGan Apr 13, 2024
7c55ae1
Fix bugs in PE and refine the implementation of shoot
JiahaoGan Apr 13, 2024
9bec65e
Solve two bugs
Apr 13, 2024
689d012
Improve the code quality
JiahaoGan Apr 13, 2024
2fed4d9
Extract methods to make executeCommand() method shorter
Apr 13, 2024
302e62c
Merge pull request #183 from runxinghuan/branch-MatchStat-Bug
runxinghuan Apr 13, 2024
73aed1a
Merge pull request #185 from runxinghuan/branch-UI-Shorter-Method
runxinghuan Apr 13, 2024
d3181fb
Update the MatchStat DG
Apr 13, 2024
c120974
Merge pull request #182 from HenryGan138/branch-v2.1a
HenryGan138 Apr 13, 2024
6c644c8
Add user stories section in DG
JiahaoGan Apr 14, 2024
c2715f9
Minor edit on code
JiahaoGan Apr 14, 2024
f696fe6
Merge remote-tracking branch 'tpmaster/master' into branch-v2.1a
JiahaoGan Apr 14, 2024
5d81e65
Merge pull request #186 from HenryGan138/branch-v2.1a
HenryGan138 Apr 14, 2024
f358440
Add DG for CoinToss component
Apr 14, 2024
6fcc6f2
Add head and tail in command summary
Apr 14, 2024
3d1eae9
Merge pull request #187 from runxinghuan/branch-DG-CoinToss
runxinghuan Apr 14, 2024
777907e
Add instructions for manual testing in DG
Apr 14, 2024
4f511e1
Merge pull request #188 from runxinghuan/branch-Instruction-Manual-Te…
runxinghuan Apr 14, 2024
e30c3a9
Edit PPP for Xinghuan
Apr 14, 2024
f6ac847
Merge pull request #189 from runxinghuan/branch-PPP-Final
runxinghuan Apr 14, 2024
f603d9a
Update on documentation
JiahaoGan Apr 14, 2024
3e11e7c
Improve on SD diagram
JiahaoGan Apr 14, 2024
321e6f1
Improve on Coding Quality
JiahaoGan Apr 14, 2024
a1f080c
Merge pull request #190 from HenryGan138/branch-v2.1a
HenryGan138 Apr 15, 2024
f01f48a
Minor change in documentation
JiahaoGan Apr 15, 2024
a5fde54
Improve on coding quality
JiahaoGan Apr 15, 2024
4f6f1f4
Edit UG
Apr 15, 2024
0ece201
Merge pull request #192 from ymirmeddeb/my-branch
ymirmeddeb Apr 15, 2024
db0573e
UG for customization command and fix non-integer value bug
Apr 15, 2024
8749bb5
Merge pull request #193 from ymirmeddeb/my-branch
ymirmeddeb Apr 15, 2024
f51a444
Merge branch 'master' into branch-v2.1a
HenryGan138 Apr 15, 2024
cda9710
Merge pull request #191 from HenryGan138/branch-v2.1a
HenryGan138 Apr 15, 2024
4624b97
Add test file
JiahaoGan Apr 15, 2024
9d3be86
Merge remote-tracking branch 'tpmaster/master' into branch-v2.1a
JiahaoGan Apr 15, 2024
fca300b
Merge pull request #194 from HenryGan138/branch-v2.1a
HenryGan138 Apr 15, 2024
ae40458
Add user stories
JiahaoGan Apr 15, 2024
3fd606d
Merge pull request #195 from HenryGan138/branch-v2.1a
HenryGan138 Apr 15, 2024
4a918e0
Add introduction to the tp website and edit AboutUs
Apr 15, 2024
f69980a
Merge pull request #196 from runxinghuan/branch-Final-Final-PPP
runxinghuan Apr 15, 2024
24ef321
About us
JiahaoGan Apr 15, 2024
d9d675c
Merge remote-tracking branch 'tpmaster/master' into branch-v2.1a
JiahaoGan Apr 15, 2024
af6035c
Solve AboutUs bug
Apr 15, 2024
5b70fd8
Merge pull request #197 from HenryGan138/branch-v2.1a
HenryGan138 Apr 15, 2024
827d135
Try to solve for not able to view PPP
Apr 15, 2024
d4f0a45
Merge branch 'master' into branch-Final-Final-PPP
runxinghuan Apr 15, 2024
7b0dad1
Merge pull request #198 from runxinghuan/branch-Final-Final-PPP
runxinghuan Apr 15, 2024
7f9197a
Edit the quick start of UG
Apr 15, 2024
5762d2e
Merge pull request #199 from runxinghuan/branch-Edit-UG
runxinghuan Apr 15, 2024
756c584
Update in PPP
JiahaoGan Apr 15, 2024
974d07d
Merge pull request #200 from HenryGan138/branch-v2.1a
HenryGan138 Apr 15, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,7 @@ bin/

/text-ui-test/ACTUAL.TXT
text-ui-test/EXPECTED-UNIX.TXT
*.jar
/.vscode

META-INF/MANIFEST.MF
3 changes: 3 additions & 0 deletions META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Main-Class: seedu.duke.Duke

1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -43,4 +43,5 @@ checkstyle {

run{
standardInput = System.in
enableAssertions = true
}
14 changes: 7 additions & 7 deletions docs/AboutUs.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# About us

Display | Name | Github Profile | Portfolio
--------|:----:|:--------------:|:---------:
![](https://via.placeholder.com/100.png?text=Photo) | John Doe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Ron John | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Don Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
Display | Name | Github Profile | Portfolio
--------|:------------:|:--------------:|:---------:
![](https://via.placeholder.com/100.png?text=Photo) | Run Xinghuan | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Henry Gan | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
![](https://via.placeholder.com/100.png?text=Photo) | Ymir Meddeb | [ymirmeddeb](https://github.com/ymirmeddeb) | [Portfolio](docs/team/johndoe.md)
![](https://incybot.github.io/images/avatars/avatar-1.png) | Sparsh | [Github](https://github.com/IncyBot) | [Portfolio](https://incybot.github.io/)

406 changes: 405 additions & 1 deletion docs/DeveloperGuide.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Duke
# NUSFC 24

{Give product intro here}

Expand Down
70 changes: 52 additions & 18 deletions docs/UserGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,32 +2,67 @@

## Introduction

{Give a product intro}
NUSFC 24 is an association football-themed game app. Unlike the more famous games like EA Sports FC 24 and eFootball,
NUSFC 24 is played via a Command Line Interface (CLI). The game does not simulate the main game of a football match.
Rather, it simulates penalty shoot-out for football.

## Quick Start
## Background Information

### Penalty Shoot-out

In a penalty shoot-out, each team takes turns shooting at goal from the penalty mark, with the goal defended only by the
opposing team's goalkeeper.

### Rules for Penalty Shoot-out

#### Best-of-five Kicks

{Give steps to get started quickly}
Teams take turns to kick from the penalty mark, until each has taken five kicks. However, if one side has scored more
goals than the other could possibly reach with all of its remaining kicks, the shoot-out immediately ends, regardless of
the number of kicks remaining.

1. Ensure that you have Java 11 or above installed.
1. Down the latest version of `Duke` from [here](http://link.to/duke).
For example, there are two teams team A and team B playing a penalty shoot-out. Both teams have taken three kicks. Team
A has scored 3 goals, while team B has scored 0 goal. Now both teams are left with two kicks. As the goal difference
between team A and team B (3) is larger than the number of kicks left for team B (2). The game ends immediately, with
team A being the winner.

## Features

{Give detailed description of each feature}
#### Sudden Death

### Adding a todo: `todo`
Adds a new item to the list of todo items.
If after five rounds of kicks, the teams have scored an equal number of goals (or neither team has scored any goals),
additional rounds of one kick each are used until one team scores and the other misses.

Format: `todo n/TODO_NAME d/DEADLINE`
## Quick Start

1. Ensure that you have Java 11 or above installed in your laptop.
2. Download the latest version of `NUSFC 24` from [here](https://github.com/AY2324S2-CS2113-F15-3/tp/releases/tag/v2.0).
3. Copy the file to the folder where you want to play the game.
4. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar tp.jar` command to run
the application.
5. Type the command in the terminal and press Enter to execute it. e.g. typing `shoot 0` and pressing Enter will shoot a
penalty at direction 0 shown in the goal.\
Some example commands you can try:
* `shoot 0`: Shoot a penalty at direction 0 shown in the goal.
* `save 0`: Make a save at direction 0 shown in the goal.
* `upgrade 2`: Upgrade your player to the medium skill level.
* `yes`: Restarts a match after a match ends.
* `no`: Does not restart a match after a match ends, and exits the game.
* `bye`: Exits the game.

6. Refer to the Features below for details of each command.

* The `DEADLINE` can be in a natural language format.
* The `TODO_NAME` cannot contain punctuation.
## Features

Example of usage:
### Restarts a match after a match: `yes`
When one match ends, you will be asked whether to have a new match or not. Type `yes` for a new match.

`todo n/Write the rest of the User Guide d/next week`
Format: `yes`

`todo n/Refactor the User Guide to remove passive voice d/13/04/2020`
### Does not restart a match after a match: `no`
When one match ends, you will be asked whether to have a new match or not. Type `no` for not having a new match, and
exits the game directly.

Format: `no`

## FAQ

Expand All @@ -37,6 +72,5 @@ Example of usage:

## Command Summary

{Give a 'cheat sheet' of commands here}

* Add todo `todo n/TODO_NAME d/DEADLINE`
* Restarts a match after a match `yes`
* Does not restart a match after a match `no`
Binary file added docs/diagrams/MatchStatClassDiagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions docs/diagrams/MatchStatClassDiagram.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
@startuml
'https://plantuml.com/class-diagram

skinparam classAttributeIconSize 0

class MatchStat {
- {static} matchCount: int
- {static} roundCount: int
- {static} playerScore: int
- {static} aiScore: int
- {static} isPlayerWin: boolean
- {static} isMatchEnd: boolean
- {static} isPlayerTurn: boolean
+ {static} updateStat(isGoal: boolean)
+ {static} updateForNewMatch()
- {static} decideMatchEnd()
}


@enduml
Binary file added docs/diagrams/MatchStatSequential.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
35 changes: 35 additions & 0 deletions docs/diagrams/MatchStatSequential.puml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@startuml
'https://plantuml.com/sequence-diagram

autonumber

-> CommandList: executeShoot("1")
activate CommandList

CommandList -> Ai: getAiDirection()
activate Ai
return direction

CommandList -> CommandList: goalCheck(1, direction)
activate CommandList
return isScoreGoal

CommandList -> MatchStat: updateStat(isScoreGoal)
activate MatchStat
MatchStat -> MatchStat: decideMatchEnd()
activate MatchStat
return

return

CommandList -> Formatter: printGoalAfterShot(isScoreGoal)
activate Formatter
Formatter -> Formatter: showScore()
activate Formatter
return

return

return
deactivate CommandList
@enduml
Binary file added docs/img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
64 changes: 64 additions & 0 deletions src/main/java/seedu/duke/CommandList.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
package seedu.duke;

import seedu.duke.ai.Ai;
import seedu.duke.stats.MatchStat;
import seedu.duke.ui.Ui;

public enum CommandList {

BYE, SHOOT, PENALTY, YES, NO, UPGRADE, EASY, MEDIUM, HARD, SAVE;

//insert new user command name here
;

/**
* Exits the program
*/
public static void executeBye() {
Formatter.printGoodbyeMsg();
Ui.setIsRunning(false);
}

public static boolean goalCheck(int userInput, int aiInput) {
assert userInput >= 0 && userInput <= 2 :
"Illegal userInput generated!";
assert aiInput >= 0 && aiInput <= 2 :
"Illegal aiInput generated!";
return userInput != aiInput;
}

public static void executePenalty(DifficultyLevel difficultyLevel) {
Ai ai = new Ai(difficultyLevel);
Penalty.executePenalty(ai);
}

public static void executeShoot(String[] readArgumentTokens) {
String selectedDirection = readArgumentTokens[0];
int selectedDirectionIndex = Integer.parseInt(selectedDirection);
boolean isScoreGoal = goalCheck(selectedDirectionIndex, Ai.getAiDirection());

MatchStat.updateStat(isScoreGoal);
Formatter.printGoalAfterShot(isScoreGoal);
}

public static void executeUpgrade(String[] level){
String upgradeLevel = level[0];
int upgradeLevelIndex = Integer.parseInt(upgradeLevel);

PlayerList.l1.get(Ui.curPlayer).upgradePower(upgradeLevelIndex);
PlayerList.l1.get(Ui.curPlayer).printSelfInfo();
}

public static void executeSave(String[] readArgumentTokens) {
String userSaveDirection = readArgumentTokens[0];
int userSaveDirectionIndex = Integer.parseInt(userSaveDirection);
int aiPenaltyDirection = Ai.getAiDirection();
boolean isGoalSaved = userSaveDirectionIndex == aiPenaltyDirection;
boolean isGoal = !isGoalSaved;
MatchStat.updateStat(isGoal);
Formatter.printSaveResult(isGoalSaved);
}

//insert new command here
}

7 changes: 7 additions & 0 deletions src/main/java/seedu/duke/DifficultyLevel.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
package seedu.duke;

public enum DifficultyLevel {
EASY,
MEDIUM,
HARD
}
50 changes: 40 additions & 10 deletions src/main/java/seedu/duke/Duke.java
Original file line number Diff line number Diff line change
@@ -1,21 +1,51 @@
package seedu.duke;

import java.util.Scanner;
import seedu.duke.exception.ProcessInputException;
import seedu.duke.player.MediumSkill;
import seedu.duke.player.Player;
import seedu.duke.stats.MatchStat;
import seedu.duke.ui.Ui;

public class Duke {


/**
* Main entry-point for the java.duke.Duke application.
*/
public static void main(String[] args) {
String logo = " ____ _ \n"
+ "| _ \\ _ _| | _____ \n"
+ "| | | | | | | |/ / _ \\\n"
+ "| |_| | |_| | < __/\n"
+ "|____/ \\__,_|_|\\_\\___|\n";
System.out.println("Hello from\n" + logo);
System.out.println("What is your name?");
Formatter.printWelcomeMsg();

Player playerThisRound = createNewPlayer();
//Assume there is single player, can only have one player in the game
//After account login function done,
//the PlayerThisRound will either return a new player, or a player existed in the PlayerList

while (Ui.getIsRunning()) {
if (MatchStat.getIsMatchEnd()) {
Formatter.printMatchResult();
PlayerList.skillUpgrade(Ui.curPlayer);
playerThisRound = PlayerList.l1.get(Ui.curPlayer);
} else if (MatchStat.getIsPlayerTurn()) {
playerThisRound.printGoalBeforeShoot();
} else {
playerThisRound.printGoalBeforeSave();
}
try {
Ui.beginListening();
Ui.processInput();
Ui.executeCommand();
} catch (ProcessInputException e) {
Formatter.printErrorExecutionFail();
}
}
}

Scanner in = new Scanner(System.in);
System.out.println("Hello " + in.nextLine());
//Bruno is a sample player for demonstration, you can try any level player
private static Player createNewPlayer() {
PlayerList.l1.add(new MediumSkill("Bruno",3));
Player playerThisRound = PlayerList.l1.get(Ui.curPlayer);
playerThisRound.printSelfInfo();
MatchStat.setMatchCount(playerThisRound.matchCount);
return playerThisRound;
}
}
Loading
Loading