C-Doku is a command-line Sudoku game written in C, featuring an interactive grid, difficulty levels, a leaderboard, and an SQLite-based scoring system. Players can solve randomly generated Sudoku puzzles while tracking their scores based on time, accuracy, and difficulty.
- Random Sudoku Generation ๐งฉ
- Three Difficulty Levels (Easy, Medium, Hard)
- Scoring System based on correct moves, penalties, and time bonus
- SQLite Database Integration for user authentication and leaderboard
- User-Friendly Controls with arrow keys for navigation
Ensure you have the following installed:
- GCC Compiler (
gcc) - SQLite3 Library (
sqlite3)
Run the following command in the terminal:
gcc -o cdoku sudoku.c -lsqlite3After compiling, execute:
./cdoku- Arrow Keys โ Navigate the Sudoku grid
- 1-9 Keys โ Fill a cell with a number
- Q Key โ Quit the game
| Action | Points |
|---|---|
| Correct entry | +10 |
| Incorrect entry | -5 |
| Time bonus | (300 / time_taken) * 5 |
| Difficulty multiplier | x1 (Easy), x2 (Medium), x3 (Hard) |
C-Doku uses SQLite3 for user authentication and score tracking:
- Users Table: Stores usernames and passwords
- Leaderboard Table: Stores usernames and their highest scores
- Add hint system for players as in the actual mobile games.
- Implement Graphical UI version to make it visually appealing.
- Enable multiplayer mode to make it more interesting.
- Make it platform-independent so that it should work on Linux/MacOS, etc.
- Maintain a database with pre-generated puzzles to randomly fetch them instead of generating it each time.
Feel free to fork this repository, create pull requests, and report issues. Contributions are always welcome!