rabiroshan / snake_game Goto Github PK
View Code? Open in Web Editor NEWClassic nokia snake game using web.
Home Page: https://rabiroshan.github.io/snake_game/
License: MIT License
Classic nokia snake game using web.
Home Page: https://rabiroshan.github.io/snake_game/
License: MIT License
Add license information for this software.
As long as there is no license, it can't be considered as a free software.
Thanks.
How to modify the code that when the snake hit the wall, make an game over alert box.
Also how to slow down the snake speed
Hi, I am Lucas. I will like your snake_game project and I want to translate it to traditional Chinese.
Can I help?
Hi,
...love the game!
Food appears to be placed on the snake, this makes it quite difficult or even impossible to eat the food when the snake gets long. I fixed it as follows in the createFood()
method:
// Create new food
currentFoodPostion = Math.random();
currentFoodPostion = Math.floor(
currentFoodPostion * SQUARE_OF_GAME_PIXEL_COUNT
);
while (gameBoardPixels[currentFoodPostion].classList.contains("snakeBodyPixel")) {
currentFoodPostion = Math.random();
currentFoodPostion = Math.floor(
currentFoodPostion * SQUARE_OF_GAME_PIXEL_COUNT
);
}
Sorry for not creating a proper PR.
Cheers
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.