Contributors Issues Repo Size Last Commit Language MIT License


MediaTek's Spelling Bee Game

Created by Austin An, Devon Fair, Gabriel Zimmermann, Noah Barger, and Tess Hughes

Getting Started

To run our game locally, you will need to follow these steps.

Prerequisites

  • Python version 3.11.2, which can be downloaded at https://www.python.org/downloads/
  • Run this command for pip
    WINDOWS:
    py -m ensurepip --upgrade
    macOS:
    python3 -m ensurepip --upgrade

Installation

  1. Clone the repo
    git clone https://github.com/mucsci-students/2023sp-420-MediaTek
  2. Navigate to the folder inside your terminal
    WINDOWS:
    cd path\to\folder\2023sp-420-MediaTek
    macOS:
    cd path to folder 2023sp-420-MediaTek
  3. Install dependencies with the following command
    WINDOWS:
    pip install -r requirements.txt 
    macOS:
    pip3 install -r requirements.txt 
  4. To build the program, run the following command while still inside the directory
    WINDOWS:
    pip install -e .
    macOS:
    pip3 install -e .

The game should now be properly installed and ready to play.

Running

  1. To launch the game in GUI mode
    WINDOWS:
    py SpellingBee.py
    macOS:
    python3 SpellingBee.py
  2. To launch the game in CLI mode
    WINDOWS:
    py SpellingBee.py --cli
    macOS:
    python3 SpellingBee.py --cli

(back to top)

Test File

CodeCov

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

Commands

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.

(back to top)

Design Patterns

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.

(back to top)

Meet the Team

Tessa Hughes Austin An Devon Fair Noah Barger Gabe Zimmermann
Tessa Hughes Austin An Devon Fair Noah Barger Gabe Zimmermann

License

Distributed under the MIT License. See LICENSE.txt for more information.

(back to top)