tp

AeroCade Developer Guide

Table of Contents

Design & Implementation

Here is a quick overview of the main components and how they interact with each other:

Parser Implementation:

Parser Class (v2.1) reads user input from the standard input stream, checks the input, tests the validity, and conveys the validity back to the class it is called from.

ParserClassDiagramV2

Briefly, the Parser class interacts with the main program by reading the inputs and throwing exceptions or returning specific values if the inputs are unexpected. This behavior is then handled by the Duke class or TicTacToe class. Parser also screens for the content of the input, specifically if the content is one of the non-gaming commands such as ‘quit’ or ‘help’

UI Implementation:

The UI consists of three classes: Ui.java, Render.java, and TimerTutorial.java. The (partial) class diagram is illustrated below:

Ui.png

The UI component,

A log file will also be made at FILE_PATH "./text-ui-test/UiLog.log" at start of program via setupLogging() in Ui, that records all Ui-related information and can be used for troubleshooting. The log file will refresh at every start.

❗ Note:
The UiLog.log file may cause merge conflicts despite being in the .gitignore file.
Cause of bug is unknown.

JUnit testing for functionality testing can be found at UiTest.java in ./src/main/test/java/seedu.duke

Game Implementation:

The Game class, is the parent class for our games, TicTacToe and Hangman.

TicTacToe Implementation:

The TicTacToe class, which inherits from the Game class, handles the Tic-Tac-Toe game itself!

The TicTacToe class:

Hangman Implementation:

The HangMan class:

Storage Class:

Storage Class is intended to load and save statistics, such as player name and number of wins, to a data file. Currently, this is unimplemented for its purpose. We plan to further develop this feature in a future release.

Visual Overview

This Sequence Diagram illustrates an overview of how the different classes interact with each other in the main game loop. ParserSequence.png

Product scope

Target user profile

Value proposition

CLI-based games work on different operating systems and environments that support command-line interfaces. This means players can enjoy the game no matter what kind of computer or setup they use.

User Stories

Version As a … I want to … So that I can …
v1.0 new user see program instructions refer to them when I forget commands to navigate the gaming application
v1.0 lazy person play a game entirely with keys on my keyboard minimize movement while playing
v1.0 user play a game of Hangman occupy myself with a harder, more engaging word-based game while travelling
v1.0 user play a game of Tic Tac Toe occupy myself with an easy, mindless game while travelling
v1.0 child play these games peacefully on my own leave my parents alone while we’re travelling
v1.0 user quit a game whenever I want try again, or give up and relax
v1.0 user play at my own pace multitask and do other things while gaming during my trip
v2.0 unfamiliar player see a dynamic gaming step-by-step tutorial see visually how to play both games
v2.0 user choose a difficulty level in Tic Tac Toe decide how challenged I want to feel in this game
v2.0 user choose a theme of words in Hangman have a more cohesive and organized experience while playing Hangman, and have more control
v2.0 user see gaming guide while in Tic Tac Toe/Hangman recall how the game works without exiting to view the tutorial and returning again
v2.0 competitive player see how many games I’ve won and lost challenge myself to winning more games
v2.0 traveller play all these games without internet connection locate a to-do without having to go through the entire list
v2.0 user see my past moves and retrace find new strategies to win
v2.0 user be prompted when I repeat the same attempts not lose points/tries because I forgot my past attempts

Non-Functional Requirements

  1. Should work on any mainstream OS as long as it has Java 11 installed.

Glossary

Instructions for Manual Testing

Booting Up

  1. Download the AeroCade.jar file from GitHub.
  2. Open a command terminal and cd into the folder you put the game file in.
  3. Input java -jar AeroCade.jar to run the game!

Shutting Down

  1. If you are in a game, type quit to exit the game.
  2. Once you are in the main menu, signified by the prompt: Now what would you like to do?, type quit again to exit the program.