Player Class ~ Class Demo Documentation - uchicago-cs/chiventure GitHub Wiki

Overview

This page contains instructions for running the player class demo (as of the 2022 version), as well as information on how the demo works and is structured.

Instructions

To run the demo, you first need to build Chiventure. Instructions for this step can be found on the README page.

Once Chiventure has been built, navigate to the chiventure/build folder. This is necessary to use the path to the WDL file used in the demo (../tests/wdl/examples/wdl/classes.wdl).

To create and run the demo, run this command in the terminal:

make examples && src/playerclass/examples/2022-demo

The two commands can be run individually, especially if the examples do not need to be remade.

Prefab class demo

Once the demo is opened, it will start by displaying the prefab class display. To view a player class' stats, enter its name. If an incorrect name is entered, the demo should indicate that the class was not found.

Once you are finished entering classes, just enter a newline to move to the next part of the demo.

Multiclass demo

The multiclass demo will open after the prefab class demo. To view a multiclass' stats, enter its name. If an incorrect name is entered, the demo should indicate that the class was not found.

Once you are finished entering classes, enter a newline to end the demo.

Structure and Function

The demo is located in the chiventure/src/playerclass/examples folder, which contains the current demo (2022-demo.c), past years' demos and helper files, and the CMakeLists.txt file. If adding a new demo, make sure to add it into the CMakeLists.txt to make sure it will create a new executable when run.

In 2022-demo.c, there are helper functions for parsing, printing, and loading from WDL, and the demo_prefab_classes() and demo_multiclasses() functions, which create both of the processes shown above.