This project is a Tic Tac Toe game developed using Qt C++. It features both multiplayer and single-player modes with three difficulty levels: Easy, Medium, and Hard. The game employs the minimax algorithm for medium and hard modes, while the easy mode uses a simpler algorithm to select moves. Additionally, the game records every move in a database and maintains a history of all played matches. A registration system (login and signup) is also implemented, utilizing QtSql for database operations.
- Multiplayer Mode: Play against another player.
- Single Player Mode:
- Easy: Uses a simple algorithm to select moves.
- Medium: Employs the minimax algorithm for a challenging experience.
- Hard: Utilizes the minimax algorithm for the most challenging experience.
- Game History: Records and maintains the history of all played matches.
- Move Recording: Each move is recorded in the database.
- User Registration: Includes a registration system with login and signup functionality.
- Database Integration: Uses QtSql to manage the game database.
- Qt: Make sure you have Qt installed on your system. You can download it from Qt Downloads.
- QtSql: Ensure that QtSql is installed and properly configured.
- C++ Compiler: A compatible C++ compiler is required.
-
Clone the Repository:
git clone https://github.com/al-sakka/Advanced_Tic_Tac_Toe
-
Open the Project: Open the project using Qt Creator or any other compatible IDE.
-
Configure the Database:
- Ensure your database is set up correctly.
- Update the database connection details in the project source code as necessary.
-
Build and Run:
- Build the project using your IDE.
- Run the executable to start playing.
- Select "Single Player" from the main menu.
- Choose the desired difficulty level: Easy, Medium, or Hard.
- Play against the computer.
- Select "Multiplayer" from the main menu.
- Play against another player on the same device.
- Register a new account using the "Sign Up" option.
- Log in using the "Login" option to access the game's features.
- Log in to your account.
- Access the game history from the main menu to view all previously played matches.
- Medium Difficulty: The minimax algorithm is used to provide a challenging game experience.
- Hard Difficulty: The minimax algorithm ensures the highest level of challenge.
- A simple algorithm that searches for empty cells to make a move.
- The game uses QtSql to interact with the database.
- Every move and game result is recorded for future reference.
- User information and game history are stored securely.
Please fork the repository and create a pull request with your changes. Ensure that your code adheres to the project's coding standards and includes appropriate documentation.
For any inquiries or issues, please contact [email protected].
Happy Coding.