I needed a more robust way to switch Screens. At this point in time I have three different screens: Start Screen Game Screen Result Screen (shown when Game Over) Switching to those screens worked via a global variable. Game starts? var screen string = "start". Enter the game? screen = "game"… You get the idea. The problem with this approach: it is surprisingly hard to keep track about what screen is supposed to be shown. This gets messy pretty soon, especially when those screens are statefu...
No comments yet. Log in to reply on the Fediverse. Comments will appear here.