https://github.com/taskin-saadman/2048-java
A lightweight desktop clone of 2048 written in pure Java (Processing Library), featuring an adjustable grid, score & timer tracking, and one‑key restart—build and run instantly with the included Gradle script.
https://github.com/taskin-saadman/2048-java
2048-game java-8 processing-sketch
Last synced: 10 months ago
JSON representation
A lightweight desktop clone of 2048 written in pure Java (Processing Library), featuring an adjustable grid, score & timer tracking, and one‑key restart—build and run instantly with the included Gradle script.
- Host: GitHub
- URL: https://github.com/taskin-saadman/2048-java
- Owner: taskin-saadman
- License: mit
- Created: 2025-04-19T07:26:34.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-05-24T12:35:00.000Z (12 months ago)
- Last Synced: 2025-06-08T15:07:58.207Z (11 months ago)
- Topics: 2048-game, java-8, processing-sketch
- Language: Java
- Homepage:
- Size: 16.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 2048 GAME
A simple graphical version of the classic **2048 game** built in Java 8.0 using Gradle as the build system.
Inspiration taken from _https://play2048.co/_
## 🧱 Project Structure
- **Language:** Java
- **Build Tool:** Gradle
- **Dependencies:**
- `org.processing:core:3.3.7`
-
## 📁 Directory Structure
```
2048-Game
|--src
| |--main
| |--java
| |TwentyFortyEight
| |--App.java
| |--Cell.java
|--build.gradle
```
## ✅ Prerequisites
- Java JDK 8 or higher
- Gradle 5.6.3 or higher (or use the Gradle Wrapper)
## 🔧 Build and Run the Project
Insert commands from root directory
```
gradle build
gradle run #(4x4 grid by default)
gradle run --args="n" #(nxn grid is generated)
```
## 🛠 Main Class
The entry point of the application is:
```
TwentyFortyEight.App
```
## 🎮 Game Controls
Use the following keyboard keys to play the game:
- **UP** – Move **Up**
- **DOWN** – Move **Down**
- **LEFT** – Move **Left**
- **RIGHT** – Move **Right**
- **R** – Restart the game after game over