An open API service indexing awesome lists of open source software.

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.

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