Giter Club home page Giter Club logo

snake-js's Introduction

snake-js

Just a little project for fun, trying to replicate the good ol' game Snake in vanilla JavaScript.

This is based on a course made on Scrimba.com but was pushed further :

  • Styled in a retro fashion, like if you were holding a (somewhat) colored Nokia 3310
  • Compared to the course, some bugs are fixed :
    • Apples now can't be generated in the snake when generated at the exact same spot as the previous apple that just got eaten
    • #3 Snake can't go backward, even if you press conflicting directions very fast

snake-js's People

Contributors

drkabum avatar manishsharma130 avatar

Watchers

 avatar

Forkers

manishsharma130

snake-js's Issues

Snake can reverse course under specific condition

Snake can reverse course when changing twice direction in the same tick.

Steps to reproduce: For instance, if you're moving right, press a first legit move (up, or down) and quickly press left before the end of the tick. The snake goes backward and dies.

Actual result: The snake can go backward and dies

Expected result: the second move shouldn't be allowed and the snake should stick to any legit moves previously pressed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.