Snake Realms is the classic Snake game granting the player the ability to choose between different realms. Players can navigate the snake to eat food, grow, earn points and power-ups while choosing from multiple themed realms including Jungle, Space, and Ocean. The game demonstrates clean architecture using JavaFX and several design patterns.
- Multiple themed realms (Jungle, Space, Ocean)
- Score tracking with persistent high scores (works in Maven run)
- Dynamic snake powers using the Decorator pattern:
- Speed Boost
- Intangibility
- Score Multiplier
- Responsive JavaFX UI
- Demonstrates design patterns:
- Singleton:
GameController - Abstract Factory:
RealmFactoryand realm-specific factories - Observer:
Scoreboardupdates automatically - Decorator: Snake powers
- Singleton:
- Clone the repository:
git clone https://github.com/nobody1355/snake-realms.git-
Open the project in an IDE like VSCode or IntelliJ IDEA.
-
Run the game using Maven:
mvn clean javafx:run- Arrow Keys: Move the snake
- Spacebar: Pause/Resume game
High score works reliably when running via Maven. The installed EXE may have issues with saving high scores due to system paths. This project is built with Java 17 and JavaFX 21.
MIT License