Hey folks! 👋 Welcome to my snake game – a classic arcade game built with JavaScript and HTML canvas. Dive into the code and have fun customizing your own version!
-
Clone the repository:
git clone https://github.com/Geno419/snake.git
-
Open
index.html
in your web browser. -
Control the snake using arrow keys (Up, Down, Left, Right) or W, A, S, D keys.
- The snake is controlled by arrow keys or W, A, S, D keys.
- The game is initialized with a grid-like canvas with a specified number of rows and columns.
- The snake grows longer each time it consumes the food (apple).
- Utilizes images for the background, apple, and snake head.
- Customize images by replacing the existing ones in the
images
folder.
- The game's styling is defined in the
style.css
file. - Feel free to tweak styles to match your preferences.
- The game ends if the snake hits the canvas boundaries or collides with itself.
- Score is displayed, and the game can be restarted after reaching the game over state.
- Images: Replace images in the
images
folder to give your game a unique look. - Styling: Modify the styles in
style.css
to personalize the game's appearance.
- Control: Use arrow keys (Up, Down, Left, Right) or W, A, S, D keys to control the snake.
- Scoring: Increase your score by eating apples. The game ends if the snake collides with the canvas boundaries or itself.
The game is hosted on GitHub Pages and can be accessed here.
Feel free to enjoy and customize this snake game for your own use. No need for contributions – let's keep it personal and fun!
Have a blast playing and customizing your snake game! If you have any questions or need assistance, feel free to reach out. Happy coding! 🐍🕹️