A Simple Text Adventure Game, a game engine that is accessed through a game server. A good example of these sorts of games is Zork . The game engine logic was built from scratch using Java, Maven, and JUnit with proper testing. While the game entities and actions are read from the file system.
The basic commands for this game are:
- Inventory - (or inv for short) lists all of the artefacts currently being carried by the player
- Get - picks up a specified artefact from the current location and adds it into the player’s inventory
- Drop - puts down an artefact from the player’s inventory and places it into the current location
- Goto - moves the player from the current location to the specified location (if there is a path to that location)
- Look - prints names and descriptions of entities in the current location and lists paths to other locations
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
- Java Development Kit (JDK) 19
- Apache Maven 3.9.0
Follow these steps to get the development environment running:
- Clone this repository using
git clone https://github.com/JamesLove1/Simple-Text-Adventure-Game.git
. - Navigate to the project directory using
cd Simple-Text-Adventure-Game
. - Run
./mvnw clean install
to build the project and install the necessary dependencies.
# Run the server
$ ./mvnw exec:java@server
# Run the client to start querying
$ ./mvnw exec:java@client -Dexec.args="James"
Run ./mvnw compile
to compile the project.
Run ./mvnw test
for testing.
- This is an assignment given by the instructor at the University of Bristol: Simon from the course of Object-Oriented Programming with Java 2022.