Re:Optional values are a code smell
by brapifra on Tuesday April 14, 2020 @07:10AM
(#22864621)
Oh, come on! haha I know it's just a silly example, but I assumed that everybody would get the (serious) idea anyway :(
[ Parent
| on HN ]
Okay, sorry, more useful response: What this leaves completely open is how you handle transitions between the state. How is a player picking up a gun implemented? What happens if the player clicks to fire if they don't have a gun?