Skip to content

Latest commit

 

History

History
38 lines (27 loc) · 1.19 KB

README.md

File metadata and controls

38 lines (27 loc) · 1.19 KB

ncurses 2048 or nc2048 is a C implementation of the popular mobile game called '2048'. It is designed to be played in a Terminal. The project was tested on Ubuntu 22.10 and Ubuntu for WSL2.

NOTE: This project was made to help the original creator learn about ncurses and the standard C99 library. It might not fully follow the C99 guidelines and conventions.

Prerequisites

  • cmake version 3.10 or later,
  • ncruses library, an installation guide is available here.

Building the project

git clone https://github.com/t0xk/nc2048.git
cd nc2048
cmake -S . -B build
cd build
make

# Run the project
./nc2048

Proposed improvements

  • The populateRandomBlock gets inefficient when the field fills up, since it re-generates a random x and y coordinate for the block until it finds one that is empty. We plan to improve this in the future.
  • The rendering and game logic should be executed on separate threads.

Screenshots

A screenshot of the nc2048 game