Snake Game is a classic implementation of the Snake game using JavaFX. This simple and intuitive game allows players to control a snake, eat food to grow, and avoid collisions with walls and itself. It features basic controls, including arrow keys for movement, spacebar for pause/resume, and a restart button. The game keeps track of the player's score, which increases as the snake consumes food. Additionally, it displays the elapsed time during gameplay.
- Start: Launch the game and follow the on-screen instructions.
- Controls: Use arrow keys (UP, DOWN, LEFT, RIGHT) or A, W, S, D to navigate the snake.
- Pause/Resume: Press the spacebar to pause or resume the game.
- Restart: Click the "Reiniciar juego" button or R to restart.
- Scoring: The score increases as the snake consumes food.
- Game Over: The game ends if the snake collides with walls or itself.
- Clone the repository.
- Open the project in a Java IDE.
- Run the
SnakeGame
class with the main method. - Enjoy playing Snake Game!
- Java Version: Java 8 or later
- JavaFX: Included in Java 8 and later versions
- IDE: Any Java IDE (Eclipse, IntelliJ, NetBeans)
Enjoy the game! ๐