Skip to content

Hamstersarus/2048

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

2048

A terminal-based implementation of the 2048 puzzle game in Java.

How to Play

Slide tiles on a 4x4 grid using the keyboard. When two tiles with the same number collide, they merge into one. Reach the 2048 tile to win!

Controls

Key Action
w Move up
s Move down
a Move left
d Move right
q Quit

Running the Game

javac *.java
java Main

Rules

  • The board starts with two tiles (each randomly a 2 or 4)
  • After every valid move, a new 2 or 4 tile appears in a random empty cell
  • Tiles merge when two equal values collide in the direction of movement
  • A merge only happens once per tile per move
  • The game ends when no moves are possible

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages