How to build and run a gradle project on the command line for Linux and Mac:
./gradlew build
./gradlew -q run
and on Windows:
./gradlew.bat build
./gradlew.bat -q run
You may also use the , however the game will likely be easier to interact with in the terminal.
Game code is located in Game/src/main/java/
.
Tests are located in Game/src/test/java/
.
YAML configuration files are located in Game/config/
.
You shouldn't have to touch any of the Gradle files.
- Add at least two new rooms in
rooms.yaml
, connected to the existing rooms. - Add an ending related to at least one of your new rooms. Endings are
implemented in
GameState.java
. - Implement a locked door that can only be opened if a Key is in your inventory.
- Finish implementing subclasses for Items (Animal, Weapon, etc) instead of reading all
items in as Items.
- Add and implement actions for all the items. All actions should modify GameState.
- Add a new subclass of items and at least three corresponding entries in
items.yaml
. - Implement two new tests in
Game/src/test/java/GameTest.java
.
Up to 2.5% extra credit (toward your overall class grade) is available if you complete one of the following options:
- Create a "game player" object that can play your game (hint: you will have to
modify the game interaction loop in
Game.java
since a virtual player cannot give input on the command line). Implement a search algorithm for your player to find and print all endings to the game. - Make a significant change to the storyline or behaviors of the game (example: add enemies and battling, including the option to "die" if an enemy does too much damage to you). Run your idea past Prof. Nilles to guarantee it will earn extra credit.