forked from nus-cs2113-AY2324S2/tp
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #95 from tannerlie/branch-update-developer-guide
Update user guide
- Loading branch information
Showing
6 changed files
with
120 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
@startuml | ||
box Architecture | ||
participant "User" as user | ||
participant "CalculaChroniclesOfTheAlgorithmicKingdom" as main | ||
participant ":UI" as ui | ||
participant ":Parser" as parser | ||
participant ":MoveRightCommand" as command | ||
|
||
user -> main : "w" | ||
activate main | ||
main -> parser : parseCommand() | ||
activate parser | ||
parser --> main : command | ||
deactivate parser | ||
main -> command : execute() | ||
activate command | ||
command --> main | ||
deactivate command | ||
main -> ui : print() | ||
activate ui | ||
ui --> user | ||
deactivate ui | ||
user -> main : next command | ||
|
||
end box | ||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
@startuml | ||
box | ||
participant ":CalculaChroniclesOfTheAlgorithmicKingdom" as main | ||
participant ":UseCommand" as use | ||
participant ":TextBox" as text | ||
participant ":PlayerStatus" as status | ||
participant ":BaseMap" as map | ||
participant ":PlayerInventory" as inventory | ||
|
||
activate main | ||
main -> use : execute() | ||
activate use | ||
opt current screen displayed is consumable inventory screen | ||
use -> text : setNextInstruction(instruction) | ||
activate text | ||
text --> use | ||
deactivate text | ||
use -> text : setNextError(error) | ||
activate text | ||
text --> use | ||
deactivate text | ||
use --> main | ||
end | ||
opt consumable list is empty | ||
use -> text : setNextError(error) | ||
activate text | ||
text --> use | ||
deactivate text | ||
use --> main | ||
end | ||
opt item not specified | ||
use -> text : setNextError(error) | ||
activate text | ||
text --> use | ||
deactivate text | ||
use --> main | ||
end | ||
opt item name was provided | ||
use -> use : findItem(itemString) | ||
activate use | ||
use -> status : getPlayerInventory() | ||
activate status | ||
|
||
status --> use : inventory | ||
deactivate status | ||
alt item is in list | ||
use -> inventory : useItem(item) | ||
activate inventory | ||
inventory --> use | ||
deactivate inventory | ||
else | ||
use -> text : setNextError(error) | ||
activate text | ||
text --> use | ||
deactivate text | ||
deactivate use | ||
end | ||
use --> main | ||
end | ||
use -> status : getPlayerInventory() | ||
activate status | ||
status --> use | ||
deactivate status | ||
opt item index doesn't exist | ||
use -> text : setNextError(error) | ||
activate text | ||
text --> use | ||
deactivate text | ||
use --> main | ||
end | ||
use -> inventory : useItem(item) | ||
activate inventory | ||
inventory --> use | ||
deactivate inventory | ||
use --> main | ||
deactivate use | ||
end box | ||
@enduml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@startuml | ||
box | ||
participant ":CalculaChroniclesOfTheAlgorithmicKingdom" as main | ||
participant ":OpenInventoryCommand" as open | ||
participant ":BaseMap" as map | ||
|
||
activate main | ||
main -> open : "execute()" | ||
activate open | ||
open -> map : "get(INVENTORY_IDENTITY)" | ||
activate map | ||
map --> open : inventory | ||
deactivate map | ||
open --> main | ||
end box | ||
@enduml |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.