/lexicon-labyrinth

Capstone Project

Primary LanguageTypeScript

Lexicon Labyrinth (Group 17)

Members

  • Muhammad Fiaz | ccid: mfiaz | studentID: 1623442
  • Joshua Wong | ccid: jyw2 | studentID: 1617843
  • Jie Fan | ccid: jie | studentID: 1573032

Setup/Deployment Instructions

  1. Deployment has been automated using Docker! Ensure that you have Docker Compose or Docker Desktop installed. To learn how to do so, please visit: https://docs.docker.com/compose/install/. Please view this document on github for the best experience.
  2. After installing Docker, from your cli run:
docker compose up

If you do not want the Docker container attached to your cli window, run:

docker compose up -d
  1. All the required dependencies will be installed automatically.
  2. Once the server and client setup process is complete, the game can be accessed at the url http://localhost:3000/.

User Guide

IMPORTANT!

When testing this game with more than one player on a single machine, run it in two separate windows side by side. Running the game in multiple tabs in the same window or with overlapping windows has a small chance to cause unexpected behaviour. This is due to browser optimizations for unfocused tabs that mess with JS setTimeout() time accuracy. Desired example setup below.

image

Create a Lobby

  1. Open the app by visiting http://localhost:3000/ on a chrome or edge browser.
  2. Click the start button to begin

image

  1. Enter your nickname and click the start button

image

  1. At this stage click the new lobby button

image

  1. Share the four digit lobby code on the top right with other players or click the copy button beside it to copy the lobby's url to your clipboard.

image

  1. Adjust the turn timer, board size, and starting player lives using the sliders

image

  1. Add a bot by clicking the add bot button

image

  1. adjust bot settings by first clicking the bot player card

image

  1. Then edit difficulty by clicking the difficulty button to cycle through the difficulties

image

  1. You can also remove the bot by pushing the remove button

image

  1. Once all players have joined (following the steps outlined in Join a Lobby by URL or Join a lobby by codebelow), start the game by clicking the start button

image

Join a Lobby by URL

  1. get a url from a lobby host.
  2. Enter the url into your chrome or edge browser
  3. Click the start button to begin

image

  1. Enter your nickname and click the start button

image

  1. The lobby code should be auto filled for you. Click the start button

image

Join a Lobby by CODE

  1. Open the app by visiting http://localhost:3000/ on a chrome or edge browser.
  2. Click the start button to begin

image

  1. Enter your nickname and click the start button

image

  1. Enter a lobby code from a lobby host. Click the start button

image

How To Play

On your turn

On your turn the letter tiles will get brighter and you will be able to click them. Click on a tile and drag to form a word. Hit the Submit button to submit the word. Tiles used to form the word must be adjacent.

image

The objective of the game is to find a word before the timer hits zero. If the timer does hit zero, you will lose a life. Once you loose all your lives, you are out of the game and can only spectate.

image

You can view the amount of funds you will get for a certain word. Funds change based on word length and letter rarity.

image

You can view the current turn order by looking at the player cards on the left. The top most player is the player who's turn it is. You can also view the funds and lives of other players.

image

Funds are used to purchase powerups in the left panel. Prices are listed beside each powerup. Click the button to activate a powerup. The panel also shows your current funds. You will not be able to purchase powerups if you do not have enough funds.

image

The rotate powerup allows you to rotate any single row or column any number of times. Clicking the rotate powerup button will open the rotate UI. Click the arrows to rotate any single row or column any number of times. Hit the confirm button to finalize the powerup.

image

The transform powerup button allows you to transform any tile into any other letter tile. Clicking the transform powerup will open the transform UI. First select the tile to transform. Then select the tile to transform that tile into.

image

The scramble powerup will randomly generate a whole new board. Clicking the scramble powerup button will scramble the board without further menus.

image

The swap powerup will allow you to swap any two tiles on the board. Clicking the swap powerup will open the swap UI. Select the first tile to swap. Then select the second tile to swap.

image

After the game

Click the continue button to return to the start screen

image

Running Automated Python Tests

  1. Install the correct libraries for these tests. Ensure you have Python v3.11.5 installed (may work with other versions, but not guaranteed).
  2. Install the requirements for the tests in the file server/requirements.txt using Python. This can be done with the following command (when in the server/ directory in a terminal window of your choice):

pip install -r requirements.txt

  1. Ensure that the server is running before running any of these testsuites. Follow the instructions for deploying the server locally in the Setup/Deployment section of this README.
  2. Select the testsuite you would like to run. You can learn more about the testsuites in the testing plan document located on the group google drive. Select the file you want to run (the tests contained in each are described in the testing plan document).
    1. unit_testsuite.py
    2. api_testsuite.py
    3. load_testsuite.py
  3. Move to the tests/ directory in a terminal window of your choice and run the following command:

py -m pytest <testsuite_name>.py