Skip to content

My CS50x final project | CLI based quiz game written in C

License

Notifications You must be signed in to change notification settings

msio808/quizbit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


project-cover

QUIZBIT - QUIZ GAME

► CLI based quiz game written in C

Softwares/Technologies Used

CLION ┃ SQLite3 ┃ OpenSSL ┃ CMake ┃ Makefile ┃ valgrind



📦 Features

    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


🚀 Getting Started

Requirements

► gcc make cmake sqlite3 valgrind libssl-dev libpcre3-dev

⚙️ Installation

Clone the quizbit repository:

git clone https://github.com/msio808/quizbit.git

Change to the project directory:

cd quizbit/config/

Install the dependencies:

./install_requirements.sh

🤖 Running the project

./build.sh --run

🧪 Debugging

./build.sh --memcheck

🗑 Clean generated build files

./build.sh --clean OR ./build.sh --clean-all

Usage

  • 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.

🚀 Screenshot

Watch the demo

🛠️ Improvements

  • Some of the functions in the src/core/gamemath.c needs improvements

  • The SIGWINCH functions located in the src/console/terminal.c also needs improvements.

🤝 Contributing

Contributions are welcome! Here are several ways you can contribute:

Contributing Guidelines
  1. Fork the Repository to your GitHub account.
  2. Clone the forked repository to your PC.
    git clone https://github.com/msio808/quizbit.git
  3. Create a new branch & give it a descriptive name.
    git checkout -b new-feature-x
  4. Make and test your changes locally.
  5. Commit with a clear message describing your updates.
    git commit -m 'Implemented new feature x.'
  6. Push the changes to your forked repository.
    git push origin new-feature-x
  7. Submit a pull request.

Check Out this 🔗 Documentation for more.


📄 License

This project is distributed under the GPL-3.0 LICENSE

👏 Acknowledgments

quick links

Releases

No releases published

Packages

No packages published