https://github.com/yemrehan/snakeproject
RGB Snake Game
https://github.com/yemrehan/snakeproject
inno-setup java javafx snake-game swing swing-gui
Last synced: 5 months ago
JSON representation
RGB Snake Game
- Host: GitHub
- URL: https://github.com/yemrehan/snakeproject
- Owner: YEmrehan
- License: mit
- Created: 2025-01-31T20:27:52.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-07-30T06:39:35.000Z (11 months ago)
- Last Synced: 2025-07-30T08:41:44.400Z (11 months ago)
- Topics: inno-setup, java, javafx, snake-game, swing, swing-gui
- Language: Java
- Homepage:
- Size: 57.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# đ Snake Game (Java)
This is a simple and fun version of the classic Snake game developed using Java Swing. The game is controlled with arrow keys and includes a basic scoring system.
## đŽ Screenshot
> The game screen displays the snake, food (apples), and current score at the top.
## đ Getting Started
### Requirements
- Java JDK 8 or later
- Any Java IDE (e.g., IntelliJ IDEA, Eclipse, VS Code) or terminal
- `javac` and `java` must be available in your system PATH
### Compile and Run
#### 1. Compile
```bash
javac -d bin src/SnakePackage/*.java
```
#### 2. Run
```bash
java -cp bin SnakePackage.SnakeGame
```
### đĨī¸ Alternative: Run the `.exe` File
You can run the game directly on Windows using the included `Snake.exe` file.
Use `Snake_Setup.exe` (created with Inno Setup) to install the game.
---
## đŽ Game Rules
- You start as a snake with 6 body parts.
- Red circles represent apples.
- Every time you eat an apple:
- The snake grows longer
- Your score increases
- The game ends if you hit the wall or collide with your own body.
- After a game over, press `Enter` to restart.
## â¨ī¸ Controls
| Key | Action |
|------------|-----------------|
| âŦ
ī¸ Left | Move left |
| âĄī¸ Right | Move right |
| âŦī¸ Up | Move up |
| âŦī¸ Down | Move down |
| â Enter | Restart the game|
---
## đ Project Structure
```
SnakeProject/
âââ src/
â âââ SnakePackage/
â âââ SnakeGame.java
â âââ GameFrame.java
â âââ GamePanel.java
âââ bin/ # Compiled classes (via javac -d)
âââ screenshot.png # Game screenshot (optional)
âââ Snake.exe # Executable file (from Inno Setup)
âââ Snake_Setup.exe # Installer (optional)
âââ README.md
```
## đ ī¸ Technologies Used
- Java 8+
- Java Swing (for GUI)
- Inno Setup (for Windows installer)
## đ License
This project is licensed under the MIT License â see the [LICENSE](LICENSE) file for details.
---
**Enjoy the game! đšī¸**