"2048" clone for the console
Just run make
to compile.
There are no dependencies beyond GNU make and gcc.
Use w
, a
, s
, d
or vi arrow keys (h
, j
, k
, l
) to play.
m
to cycle through draw modes (fancy, compact and ultra-compact).
r
rotates the board, f
flips horizontally, v
flips vertically.
n
resets the board (new game).
q
quits.
Game state is automatically saved/loaded in ~/.config/2nrc
.
Set environment variable SIZE
to change the board size
(effective on next board init), must be between 3 and 16.
Example: SIZE=8 ./2n
-
2n.c: main() and drawing
-
game.c, game.h: game logic
-
itr.c, itr.h: cell iterator
-
rawkb.c, rawkb.h: get input from the keyboard