ccapital is a TUI quiz game designed for learning the capitals of the world (e.g., Berlin, Germany).
I wanted to create a simple quiz game in C that uses ncurses for the TUI. The game is designed to help users learn the names of world capitals by displaying a random country name (e.g., "Germany") and prompting the user to identify its capital city (e.g., "Berlin"). But to be honest, it's more of an excuse to play around with good old C and ncurses.
- Written in modern C (C17).
- Comprehensive documentation with doxygen-style comments.
- Automatic third-party dependency management using CMake's FetchContent.
The src
directory is organized as follows:
- Single
main.c
file.
This project has been tested on the following systems:
- MacOS 14.5 (Sonoma)
To build and run this project, you'll need:
- C17 or higher
- CMake
Follow these steps to build the project:
-
Clone the repository:
git clone https://github.com/ryouze/ccapital.git
-
Generate the build system:
cd ccapital mkdir build && cd build cmake ..
-
Compile the project:
To compile the project, use the following command:
make
To use all available cores with
make
, pass the-j
flag with the number of cores available on your system:# MacOS make -j$(sysctl -n hw.ncpu)
# GNU/Linux make -j$(nproc)
After successful compilation, you can run the program using ./ccapital
.
The mode is set to Release
by default. To build in Debug
mode, use cmake -DCMAKE_BUILD_TYPE=Debug ..
.
If not already built, follow the steps in the Build section and ensure that you are in the build
directory.
To install the program, use the following command:
sudo cmake --install .
To run the program, use the following command:
ccapital
All contributions are welcome.
This project is released into the public domain and is licensed under the Unlicense.