Cryptogram puzzle game in Python
This is a Cryptogram puzzle game that you can play in the console.
- Must have Python 3.8 and pipenv installed (installation instructions) (Python version > 3.6 should also work too, needs to have PEP 498 - formatted string literals)
- Clone this repo:
git clone https://github.com/kirakirakira/cryptogram.git
- Make sure you are in the top project directory (cryptogram if you didn't rename it)
- Run
make init
to install dependencies. - Run
make activate
to activate the virtual environment. - Run
make run
to start the game.
If you're unable to install pipenv, but you have Python 3.8, you can run the game without a virtual environment by running:
python3 game.py
- Run
make test_puzzle
to run tests onPuzzle
. - Run
make test_game
to run tests onGame
.
This is a Cryptogram puzzle game, and you will be deciphering some text and that text is a title of an episode of Gilmore Girls. For more on Cryptograms. For a list of Gilmore Girl episodes.
Since the game can take a while to actually play, you might notice that the answer is printed out at the beginning of a round of play...obviously this is just for testing purposes. 😆
Do you want to play? (y/n) y
Let's play!
"The Great Stink"
What difficulty would you like to play? (easy (E)/medium (M)/hard (H)) H
Number of turns: 10
"___ _____ _____"
"AZS LYSRA OAVJQ"
What letter would you like to replace? A
What letter would you like to replace it with? T
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Turns left: 9
"T__ ____T _T___"
"AZS LYSRA OAVJQ"
What letter would you like to replace?
- Implemented a “master loop” console application where the user can repeatedly enter commands/perform actions, including choosing to exit the program (
play_game
andplay_round
) - Created a class, then created at least one object of that class and populate it with data (
Puzzle
's puzzles come fromSoup
) - Created a dictionary or list, populated it with several values, retrieved at least one value, and used it in the program (
self.alpha_to_hash
,self.hash_to_alpha
, andself.alpha_to_guesses
) - Read data from an external file, such as text, JSON, CSV, etc and use that data in your application (scraped a webpage using Beautiful Soup) (
Soup
scrapes Gilmore Girl episode titles from a Wikipedia page) - Created and called at least 3 functions, at least one of which returned a value that is used (there's a whole bunch)
- Create 3 or more unit tests for your application (see
test_game.py
andtest_puzzle.py
)
- Comments exist
- Greater than 70 commits