Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save amcrawford/b8ab021d7a7ee5090105 to your computer and use it in GitHub Desktop.
Save amcrawford/b8ab021d7a7ee5090105 to your computer and use it in GitHub Desktop.

What is one approach you can take from this Mary's code and implement in your project?

  • I really like Mary's use of filter to check for the presence of fellow invaders within a firing path and block the action if the result was greater than 0. I think that we could use a similar approach to track our snake's body and prevent backward movement over itself.
  • I also like how object oriented everything was; right now our game is a long method that is called at page-load but, we should abstract it out into instances of a "Game" module which might also help with some reset issues we are hitting now.
@rrgayhart
Copy link

🐍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment