Snake_Game_Java

Game dirsciption

We have a rattlesnake in a desert, and our snake is initially two units long (head and rattler). We must collect with our snake the foods on the level, that appears randomly. Only one food piece is placed randomly at a time on the level (on a field, where there isno snake). The snake starts off from the center of the level in a random direction. The player can control the movement of the snake’s head with keyboard buttons. If the snake eats a food piece, then its length grows by one unit. It makes the game harder that there are rocks in the desert. If the snake collides with a rock, then the game ends. We also lose the game, if the snake goes into itself, or into the boundary of the game level. In these situations, show a popup message box, where the player can type his name and save it together with the amount of food eaten to the database. Create a menu item, which displays a highscore table of the players for the 10 best scores. Also, create a menu item which restarts the game.

How to run the game

You will need to have netbeans IDE then you easly open the project, create a database, create a highscore database with 4 filds (timestemp, name, level, score) then connect the database and run the game! if you don't have netbeans IDE then you have to find a way to connect the game with a database!