Created by Austin An, Devon Fair, Gabriel Zimmermann, Noah Barger, and Tess Hughes
To run our game locally, you will need to follow these steps.
- Python version 3.11.2, which can be downloaded at https://www.python.org/downloads/
- Run this command for pip
WINDOWS:macOS:py -m ensurepip --upgrade
python3 -m ensurepip --upgrade
- Clone the repo
git clone https://github.com/mucsci-students/2023sp-420-MediaTek
- Navigate to the folder inside your terminal
WINDOWS:macOS:cd path\to\folder\2023sp-420-MediaTek
cd path to folder 2023sp-420-MediaTek
- Install dependencies with the following command
WINDOWS:macOS:pip install -r requirements.txt
pip3 install -r requirements.txt
- To build the program, run the following command while still inside the directory
WINDOWS:macOS:pip install -e .
pip3 install -e .
The game should now be properly installed and ready to play.
- To launch the game in GUI mode
WINDOWS:macOS:py SpellingBee.py
python3 SpellingBee.py
- To launch the game in CLI mode
WINDOWS:macOS:py SpellingBee.py --cli
python3 SpellingBee.py --cli
To run the test file, navigate to the main directory with WINDOWS:
cd path\to\folder\2023sp-420-MediaTek
macOS:
cd path to folder 2023sp-420-MediaTek
then run the command
WINDOWS:
py test/run.py
macOS:
python3 test/run.py
See below for a list of CLI-specific commands and their functionality! All commands support tab-completion.
newpuzzle
Generates a new puzzle. You will be given the option to provide your own pangram for puzzle creation.showpuzzle
Displays the current puzzle, including all kinds of fun stats.showfoundwords
Lists all of the correctly guessed words.shuffleletters
Shuffles the given letters in a random arangement (except the required letter which stays in the center).savepuzzle
Saves your puzzle to the root directory. **NOTE: The GUI version lets you save anywhere on your machine.loadpuzzle
Allows you to load a saved puzzle from the root directory. **NOTE: The GUI version lets you load from anywhere on your machine.showstatus
Shows your current rank, points earned, and total points possible.showhints
Shows useful stats for solving a puzzle, including how many words start with each letter.giveup
'Give up' on the puzzle and submit your score and provided username to the high scores board.showhighscore
Displays the top ten local high scores for a given puzzle (if there are any existing scores).gamehelp
Displays the list of commands currently accessible.gameexit
Exits the game. You will be asked if you want to save your puzzle to not lose progress.
Below is a list of design patterns used in our program and where to find them!
- MVC
Our codebase follows a general Model-View-Controller schema, which can be seen within the MVC directory. - Singleton
MVC/view/CLI.py contains the singleton design pattern, where it only has one instance and returns the same object. - Iterator
MVC/view/GUI.py contains the iterator design pattern, where an iterator object is used to loop through a list and restrict user inputs. - Observer
MVC/controller/Controller.py contains the Observer and Subject classes that notify MVC/view/GUI.py of changes to load. - Factory
MVC/view/GUI.py contains a factory class, which supplies a basic implementation of several UI elements, and OS specific classes which alter the behavior of those elements using parameters. - Strategy
MVC/controller/Controller.py contains the strategy design pattern, which allows the program to use different variants of the saving algorithm for encrypted and non-encrypted saves.
Tessa Hughes | Austin An | Devon Fair | Noah Barger | Gabe Zimmermann |
Distributed under the MIT License. See LICENSE.txt
for more information.