This project is a version of the classic TicTacToe game developed using C++ with user-friendly GUI, AI opponent with levels, and secure user authentication system. It supports both player vs player and player vs AI modes, with persistent game history and performance tracking. the files above is divided into src files that contains the game logic and the gui contains GUI and database implementation. The zip file contain the game. You can download it and decompress the file and try to play the game.
- Develop a feature-rich TicTacToe game using C++ and Qt.
- Enable secure user registration, login, and profile management.
- Implement an AI opponent with deifferent levels of difficulty.
- See individual game history per user showing the matches played "the opponent and the winner" and when .
- Conduct comprehensive unit/integration testing with Google Test.
- Use CI/CD pipelines with GitHub Actions for continuous testing and deployment.
- Turn-based mechanics for both multiplayer and AI matches.
- Win/tie detection after every move.
- Implements levels of difficulty easy, normal and hard.
- Easy: plays random moves on the empty grid.
- Normal: checks if there is a potential winning move and plays it and if there is a potentials winning move for the opponent it blocks it but it gives the priority to the winnig move. Otherwise, it plays randomly.
- Hard: plays according to the Minimax with alpha-beta pruning algorithm.
- Built with Qt for rich, interactive user experience.
- GUI components for gameboard, login/register screens and history browser.
- Secure login/registration using hashed passwords.
- Session management for persistent login.
- Logs all games played by each user showing:
- who played the match
- who won the match
- when the match played
- Supports reviewing and replaying previous games.
- Unit and integration tests using Google Test.
- Test reports with coverage analysis.
- GitHub Actions for automatic build, test, and deployment pipelines.
- Focus on minimizing latency and optimizing resource usage.
##📄 List of Documents
- Software Requirements Specification (SRS)
- Software Design Specification (SDS)
- Testing Document
- Performance Measurement and Optimization
| Component | Technology |
|---|---|
| Language | C++ |
| GUI Framework | Qt |
| Database | SQLite |
| Testing Framework | Google Test |
| Version Control | Git + GitHub |
| CI/CD | GitHub Actions |
| Security | Password hashing |
- Tree: for AI decision-making via Minimax algorithm in hard level.
- Struct: for saving the moves on the grid.
- Pairs: to save the salt and hash password in the database.
- Vectors: used in the database and it behaves as a queue to save moves of a certain game.
- Classes: to determine the play mode human vs human or human vs AI.
- Enums: for representing the state of each cell or the game status—for example, PLAYER_X and PLAYER_O instead of numeric values to improves code readability and reduces logic errors.