8000 GitHub - dholms/tui48: 2048 in the terminal · GitHub
[go: up one dir, main page]

Skip to content
dholmsPublic

About

2048 in the terminal

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

tui48

A lightweight terminal 2048 clone. Endless mode, truecolor tile palette, single-step undo, in-session restart, per-run stats, and opt-in risky-move warnings.

Install

go install github.com/dholms/tui48/cmd/tui48@latest

Run

tui48

Controls

  • Move: arrow keys, or ijkl (i=up, j=left, k=down, l=right)
  • (u)ndo last move
  • (r)estart: new game
  • (w)arnings: toggle risky-move confirm on/off (default on)
  • (s)tats: open / close the stats screen (auto-opens on game-over)
  • (q)uit: also ctrl+c

Risky-move confirm

With warnings on, any move flagged as risky requires a second press of the same direction to confirm. The four risk checks are:

  • the move pulls your max tile out of its corner
  • the move lets a spawn end the game outright
  • the move lets a spawn leave you with only one legal direction
  • the move slides tiles off your anchor edge

While armed, the board is wrapped in a red border and the hint line names the reason. Pressing a different direction re-evaluates against that direction; pressing any other key (except s, which pops stats and returns to the armed state) clears the armed state.

Run history

Every finished game is appended as one NDJSON line to $XDG_STATE_HOME/tui48/history.ndjson (falls back to ~/.local/state/tui48/history.ndjson). The stats screen shows milestone counts, best score, and percentile ranking split between "clean" runs (no undos used) and all runs.

About

2048 in the terminal

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0