Table of Contents
Mastermind is a code-breaking game in which two players compete against each other. The game begins when the first participant, dubbed "The Codemaker", generates a four-digit (color) code that is hidden. The second participant, dubbed "The Codebreaker" then guesses a code.
The codemaker then evaluates the estimate by handing certain black and white pins to the codebreaker (plus and minus in the paper version). The codebreaker guesses another code based on the evaluation, and the game continues until the codebreaker finds (or fails to locate) the concealed code within the maximum number of tries.
Major frameworks/libraries used in this project:
1. Master Mind Class
The main MasterMind game Process; it contains:
- get_random_solution(): Returns a random "solution" to be the hidden code.
- check_guess(): Returns the nb of "correct" and nb of "misplaced" guess.
- get_correct_colors(): Returns the "correct" colors.
- get_misplaced_colors(): Returns the "misplaced" colors.
- is_won(): Verify that the guess is correct according to the solution.
2. MainWindowUi Class (GUI_Window)
The main window of the game designed by Qt; it contains:
- setupUi(): The QT codes that generate the main window.
- resetButtonClicked(): That delete the selected colors.
- set_thisguesstable(): connect the colors.
- clicked_color(): Send the selected colors to the Guess table.
- clicked_submit(): After clicking the submit button; its check the guess and return the score to the Scores Table.
- show_game_over(): Show the Game Over Dialog. -print_score(): print score in the terminal (NOT GUI).
3. GameOverWindow Class (GUI_Window)
The resulting window, which shows the player's loss(+) or victory(-).
- display_text(): Return a text with include the result of the game.(Win/Loss)
4. Splash Screen Class (GUI_Windows)
{⌛}
GUI OUTPUT:
TERMINAL OUTPUT:
Distributed under the MIT License. See LICENSE.txt
for more information.
🔎
Rabih ND - @RabihND
Hasan Sanei - @hasansanei
Project Link: https://github.com/RabihND/AP2021-2022-Final
- Write the main code-map.
- Design the GUI window.
- Write the MasterMain Core Functions.
- Design the GameOver window.
- Build the .EXE Release
- Splash screen
- Build APK release.