Skip to content

Golfing7/DragonMaze

Repository files navigation

DragonMaze

This project was created for CS110 for the 2nd project assignment.

Lombok (https://projectlombok.org/) was used to create some boiler-plate code in this project.

Instructions

Building

To build the project, open a terminal, cd to the project directory and run the command:

Windows

build.bat

Unix/Mac

./build.sh (A chmod +x gradlew and chmod +x ./build.sh MAY be required before running this command.)

Note that if "Git" is installed on a Windows computer, the ./build.sh file will work on that system.

Running

Navigate to the "DragonMaze/build/libs/" directory and run the file via:

java -jar DragonMaze-1.0-all.jar

Note that both the "DragonMaze-1.0-all.jar" and the "DragonMaze-1.0.jar" will run, however, the former has JLine shaded into it to enhance user input. The latter will fall back on normal java.util.Scanner input which requires the user press "Return" to finalize their input.

Information

This game was created with the intention of implementing all requirements of the 2nd project with some extras added in for fun :).

The game is best played inside the Terminal on Mac and the Command Prompt on Windows as the program has been built to utilize JLine when possible to allow for instant single-character input.

Running the Game

When starting the game, the user will be prompted to resize their screen. This is done so the fireball animation will visually make sense. It isn't required, but does enhance the gameplay of the dragon fight.

Next, they will be prompted to input a maze file or type "random" to create a maze at random. If "random" is chosen, the game will use the MazeGenerator class to create a random maze. It supports seeds as well, although it has not been implemented to accept them as input.

After this, the final setting will be asked: Difficulty. There are some major differences in the game when choosing different difficulties, so it's advised to read the descriptions of each.

Once all this has been retrieved from the user, the game will begin and the first movement input will be requested.

The cycle of movement input is repeated until the hero:

  • Fights the Dragon (The cycle resumes if the hero is victorious)
  • Escapes
  • Dies

Enjoy!

About

2nd Project for CS 110 with Thomas Devine (Fall 2021)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages