thoughtram / reactive-snake

Taming snakes with reactive streams
83 stars 27 forks source link

How to restart the game? #3

Closed CHBaker closed 5 years ago

CHBaker commented 5 years ago

Hey, I just built this in Angular 7 following your guide. I tried to get the game to restart on click by unsubscribing all Observables, then calling a function to recreate them and clear the canvas. But it doesn't seem to work. Any advice on restarting the game?

d3lm commented 5 years ago

Hey Charles! Happy to see you're implementing the game on your own. Have you seen this? The restart logic is implemented in the second commit on the master branch.

CHBaker commented 5 years ago

ah, thanks!