24b0d121e09c28a8699fe8b115ef046c61f42f4f94


@startuml

state "save file" as sf <<choice>>

sf --> hasSave: ์„ธ์ด๋ธŒ ํŒŒ์ผ ์žˆ์Œ

sf --> nonSave: ์„ธ์ด๋ธŒ ํŒŒ์ผ ์—†์Œ

[*] --> sf


state "ํƒ€์ดํ‹€ ํ™”๋ฉด" as hasSave {

ย  state "์ด์–ดํ•˜๊ธฐ" as continue

ย  state "์ƒˆ ๊ฒŒ์ž„" as newGame1

ย  state "์˜ต์…˜" as option1

ย  state "๊ฒŒ์ž„ ์ข…๋ฃŒ" as exit1

}

state "ํƒ€์ดํ‹€ ํ™”๋ฉด" as nonSave {

ย  state "์ƒˆ ๊ฒŒ์ž„" as nonSaveNewGame

ย  state "์˜ต์…˜" as option2

ย  state "๊ฒŒ์ž„ ์ข…๋ฃŒ" as exit2

}

continue -[#blue]-> continueConfirm

newGame1 -[#red]-> selectDeck

nonSaveNewGameย -[#red]-> selectDeck

option1 -[#green]-> option

option2 -[#green]-> option


state "์ด์–ดํ•˜๊ธฐ ํ™•์ธ์ฐฝ" as continueConfirm {

ย  continueConfirm : **์ง„ํ–‰๋„ ํ™•์ธ**

ย  continueConfirm : ๋‚œ์ด๋„

ย  continueConfirm : ์ง„ํ–‰์ค‘์ธ ์Šคํ…Œ์ด์ง€

ย  continueConfirm : ๋ณด์œ ์ค‘์ธ ์žฌํ™”

ย  continueConfirm : ...

ย  state "์‹œ์ž‘" as start

ย  state "์ทจ์†Œ" as cancel

}

cancel -up[dashed]-> hasSave

start --> play


state "๋ฑ ์„ ํƒ" as selectDeck {

ย  selectDeck : **๋ฑ**ย ย 

ย  selectDeck : ๋ฑ ์„ค๋ช…

ย  state "<<" as prevDeck

ย  state ">>" as nextDeck

ย  state "์„ ํƒ" as deckSelectย 

ย  state "์ทจ์†Œ" as deckCancel

}

prevDeck --> prevDeck: ์ „ ๋ฑ(๋ฃจํ”„)

nextDeck --> nextDeck: ๋‹ค์Œ ๋ฑ(๋ฃจํ”„)

deckSelect --> selectDiff

deckCancel -up[dashed]-> nonSave

deckCancel -up[dashed]-> hasSave


state "๋‚œ์ด๋„ ์„ ํƒ" as selectDiff {

ย  selectDiff : **๋‚œ์ด๋„**ย ย 

ย  selectDiff : ๋‚œ์ด๋„ ์„ค๋ช…

ย  state "<<" as prevDiff

ย  state ">>" as nextDiff

ย  state "์„ ํƒ" as diffSelect

ย  state "์ทจ์†Œ" as diffCancel

}

prevDiff --> prevDiff: ์ „ ๋‚œ์ด๋„(๋ฃจํ”„)

nextDiff --> nextDiff: ๋‹ค์Œ ๋‚œ์ด๋„(๋ฃจํ”„)

diffCancel -up[dashed]-> nonSave

diffCancel -up[dashed]-> hasSave

diffSelect --> play


state "์˜ต์…˜" as option {

ย  option: **๊ฒŒ์ž„ ์„ค์ •**

ย  option: ์˜ต์…˜ ๊ธฐํš์„œ ์ฐธ์กฐ

ย  state "์ €์žฅ" as optionSave

ย  state "์ทจ์†Œ" as optionCancel

}

optionSave -up-> nonSave

optionSave -up-> hasSave

optionCancel -up[dashed]-> nonSave

optionCancel -up[dashed]-> hasSave


state "๊ฒŒ์ž„ ์ข…๋ฃŒ" as exit <<sdlreceive>>

exit1 -down[#DD00AA]-> exit

exit2 -down[#DD00AA]-> exit


state "๊ฒŒ์ž„ ํ”Œ๋ ˆ์ด ์”ฌ" as play <<sdlreceive>>


selectDeck -right[hidden]-> exit

option -right[hidden]-> exit

continueConfirm -right[hidden]-> selectDiff


@enduml


๋‚œ ๊ธฐํš์ž๋ฉด UML์ •๋„๋Š” ์ž‘์„ฑํ•  ์ˆ˜ ์žˆ์–ด์•ผ ํ•œ๋‹ค๊ณ  ์ƒ๊ฐํ•˜๋Š”๋ฐ
๋Œ€์ถฉ ์ฐฝ 5๊ฐœ๋งŒ UML์ž‘์„ฑ ํ•ด๋ณธ๊ฑด๋ฐ ์ด ์ •๋„์•ผ
ํ•œ ํ™”๋ฉด์— ๋ณดํ†ต ์ด๊ฒƒ๋ณด๋‹คย 5~6๋ฐฐ๋Š” ์ ์–ด์•ผํ•˜๋‹ˆ๊นŒ

์ด๊ฑฐ ํ• ๋ฐ”์—” ๊ทธ๋ƒฅ ํ”„๋กœ๊ทธ๋ž˜๋จธ ํ•œ๋‹ค ํ•˜๊ณ  ๋‹ค ํ”„๋กœ๊ทธ๋ž˜๋จธ๋กœ ์ „์งํ•œ๊ฑฐ ์•„๋‹๊นŒ?