Cracked Egg game

2
votes
0 answers
Create a flowchart for the Cracked Egg game:

start[Start]
input(User guesses number of hard-boiled eggs)
check[Check if input is valid]
valid(Input is valid)
invalid(Input is invalid)
valid-->play
invalid-->input
play{Play Game}
rand(Randomly pick an egg to crack)
raw(Raw egg cracked)
hard(Hard-boiled egg cracked)
rand-->raw
raw-->|Increment raw count|count
raw-->|Increment total count|total
hard-->|Increment hard-boiled count|count
hard-->|Increment total count|total
count{Check if all eggs cracked}
count-->|Yes|result
count-->|No|rand
result[Compare user's guess to number of hard-boiled eggs]
won(User guessed correctly)
lost(User guessed incorrectly)
won-->output
lost-->output
output[Output game result]
input-->check
check-->valid
check-->invalid
Post

Help

⌘ + D bookmark this site for future reference
⌘ + ↑/↓ go to top/bottom
⌘ + ←/β†’ sort chronologically/alphabetically
↑↓←→ navigation
Enter open selected entry in new tab
⇧ + Enter open selected entry in new tab
⇧ + ↑/↓ expand/collapse list
/ focus search
Esc remove focus from search
A-Z go to letter (when A-Z sorting is enabled)
+ submit an entry
? toggle help menu
βœ•
0 AIs selected
Clear selection
#
Name
Task