Assignment 1 of CSC108 University of Toronto 2022 Goals of this Assignment:
Mystery Message Game: In this assignment, you'll be writing functions to complete a Mystery Message game. To see how the game is played, please watch this video demo (https://web.microsoftstream.com/video/81adfd34-8a6d-4ee2-93e4-c2af7d26a804) The video demonstrates playing the one-player version of the game, but your code will eventually also have a two-player human vs. human version and also a human vs. computer version.
Starter code: For this assignment, we are giving you some files, including Python starter code files. Please download the Assignment 1 Files Download Assignment 1 Filesand extract the zip archive. There are three starter code Python files, two sample text input files, and a Python program that helps you check (not fully test!) your solutions for Python style violations:
More about the Mystery Message program:
Two strings are used to represent information about a Mystery Message:
There are three types of games that your program will play: human, human vs human, and human vs computer. We will use the constants HUMAN, HUMAN_HUMAN, and HUMAN_COMPUTER respectively, to represent the type of game being played.
When a player guesses a consonant, each occurrence of that consonant in the message earns a certain number of points for that player: the value of the constant CONSONANT_POINTS. If a player correctly guesses a consonant, they play again in the next turn. If the guess is incorrect, the turn goes to the next player (in a two-player game).
Players have to pay to guess a vowel. The cost does not depend on the number of occurrences of the vowel, and is always equal to the value of the constant VOWEL_COST. Thus, guessing a vowel decreases the player's points. A player is not allowed to guess a vowel if they do not have sufficient points to pay for it. If the vowel occurs in the message, then the player plays again. Otherwise, the turn goes to the next player (in a two-player game).
When a player finishes the game by correctly guessing the message, CONSONANT_BONUS bonus points are added to their score for each occurrence of a consonant that is still HIDDEN.
All messages are always lower-case. That is, the messages will not contain any upper-case letters.
You should read the file constants.py carefully to understand the purpose of each defined constant. You must use these constants in your code and not the literal values. For example, you must use HIDDEN instead of '^'.
This project was completed using Wing IDE.