► CLI based quiz game written in C
Softwares/Technologies Used
CLION ┃ SQLite3 ┃ OpenSSL ┃ CMake ┃ Makefile ┃ valgrind
🔗 Table Of Contents
This project is a CLI Quiz Game written in C as my final project for the CS50x course. It is designed to test user's knowledge across three categories: Science, Sports, and General Knowledge. Users can log in to an existing account or sign up for a new one, and their progress is saved in an SQLite database. This project demonstrates proficiency in C programming, database management, and basic security practices.
User Authentication
-
Users can log in to their account or create a new one through the sign-up process
Quiz Categories
-
The game offers three categories — Science, Sports, and General Knowledge. Users can choose any category to start the quiz.
Randomized Questions
-
Questions are randomly selected from the chosen category to ensure a unique experience each time.
Score Tracking
-
The game records user scores and allows users to view their scores in their profile.
Profile Management
- Users can view their profile, edit their information, delete their account, or reset their profile data.
📂 Repository Structure
.
├── config
│ ├── build.sh
│ ├── CMakeLists.txt
│ ├── install_requirements.sh
│ └── requirements.txt
├── docs
│ ├── img
│ │ └── qmark.png
│ └── README.md
├── include
│ ├── console.h
│ ├── db.h
│ ├── emojis.h
│ ├── gamecore.h
│ ├── gamemath.h
│ ├── global.h
│ └── utilities.h
├── LICENSE
└── src
├── console
│ └── terminal.c
├── core
│ ├── account.c
│ ├── gamecore.c
│ ├── gamemath.c
│ ├── gameplay.c
│ └── userprofile.c
├── db
│ ├── database.c
│ └── questions.c
├── main.c
└── utils
├── authutil.c
├── gameutil.c
└── utilities.c
► gcc make cmake sqlite3 valgrind libssl-dev libpcre3-dev
git clone https://github.com/msio808/quizbit.git
cd quizbit/config/
./install_requirements.sh
./build.sh --run
./build.sh --memcheck
./build.sh --clean OR ./build.sh --clean-all
- After building and running the project, Choose "Sign Up" and follow the prompts to create an account.
- Login to your account.
- Use the arrow keys to navigate through the game
- Click on the
gameplay help
menu to read more about the game. - Select a quiz category.
- Answer the quiz questions and track your score.
-
Some of the functions in the
src/core/gamemath.c
needs improvements -
The
SIGWINCH
functions located in thesrc/console/terminal.c
also needs improvements.
Contributions are welcome! Here are several ways you can contribute:
Contributing Guidelines
- Fork the Repository to your GitHub account.
- Clone the forked repository to your PC.
git clone https://github.com/msio808/quizbit.git
- Create a new branch & give it a descriptive name.
git checkout -b new-feature-x
- Make and test your changes locally.
- Commit with a clear message describing your updates.
git commit -m 'Implemented new feature x.'
- Push the changes to your forked repository.
git push origin new-feature-x
- Submit a pull request.
Check Out this 🔗 Documentation for more.
This project is distributed under the GPL-3.0 LICENSE