Skip to content

Latest commit

 

History

History
42 lines (33 loc) · 1.33 KB

README.md

File metadata and controls

42 lines (33 loc) · 1.33 KB

snake-js

Welcome to Snake-JS from UWC 3 final!

SnakeJS Enjoy the 6-hour-made fun game from the Ukrainian Web Challenge III! Reach the greatest level within the minimum time and be happy! :) Don't forget to enter your name before start.

Tech specs:

Dependencies

Size

  • Dev: 10.8 kB
  • Minified: 4.79 kB

Usage example

<script src="snake.js"></script>
<script>
    SnakeJS.init({
        // optional parameters
        maxFood: 10
    });
</script>

Optional parameters

  • snakeLength - initial cells count for snake (default: 6)
  • speed - initial timeout in milliseconds for snake to move (default: 500)
  • acceleration - timeout reduction in milliseconds after level up (default: 20)
  • maxSpeed - end point for timeout, when it will not be changed anymore (default: 200)
  • cols - playfield columns (default: 20)
  • rows - playfield rows (default: 13)
  • maxFood - maximum number of food, that can be generated after all food is eaten by snake. minimum is 1 (default: 5)

Support or Contact

Have questions? Feel free to contact me on Github.