Zelphir Kaltstahl ba8c1d6064 update notes | 3 年之前 | |
---|---|---|
config | 3 年之前 | |
guix-env | 4 年之前 | |
lib | 3 年之前 | |
python-env | 3 年之前 | |
.gitignore | 3 年之前 | |
.gitmodules | 3 年之前 | |
LICENSE | 4 年之前 | |
config.scm | 3 年之前 | |
data-abstraction.scm | 3 年之前 | |
effect.scm | 3 年之前 | |
main.scm | 3 年之前 | |
model.scm | 3 年之前 | |
notes.org | 3 年之前 | |
readme.md | 3 年之前 | |
readme.org | 3 年之前 | |
start.bash | 3 年之前 | |
validate.bash | 3 年之前 |
This project contains a program for simulating an imaginary vacation trip.
The program depends on the following software:
guile-json
of GNU Guix commit (revision) 8518a3692cbb9cd96d69c03e9de9ad6fdcfebbee
– Other versions were not tested. However, the program does not use advanced features of the library, so other versions will probably work fine as well.Clone the repository using:
git clone --recurse-submodules --remote-submodules URL
Or, if you are using an older version of git
:
git clone URL
cd DIR_OF_REPO
git submodule update --init --recursive
A GNU Guix environment setup script is provided in guix-env/env.bash
. You can run it using GNU Bash from the root directory of the cloned repository:
bash guix-env/env.bash
After which you will have the required libraries to run the program. You can run the program from the root directory of this project as follows:
guile -L '.' -L 'lib/fslib' -L 'lib/guile-user-input-output' --fresh-auto-compile main.scm
Alternatively, you can mke use of the provided GNU Bash script in the root directory of the cloned repostitory:
bash start.bash
If you do not have GNU Guix installed, you need to consult the list of dependencies and make sure you got them satisfied, before running the program.
Events that can occur while travelling as well as the difficulty of the journey are specified in config/transportation/*.json
files.
Other than that here is a list of configuration files, and their corresponding schemas:
config/general.json
config/schema/general-schema.json
config/player/*.json
config/schema/player-schema.json
config/transportation/*.json
config/schema/transportation-schema.json
default.json
, which specifies the default events, which can happen, when there is no configuration for a means of transportation, which the player has chosen to use in their player configuration. Each transportation configuration file contains events and possible actions after events happen. Events have probabilities and actions have karma among other attributes.There are JSON schemas given for configuration files as ...-schema.json
. To make use of them, you may use any program you want to use for validating the configuration files against their corresponding JSON schema. A little Python 3 program is given in validate.py
, which validates using the jsonschema
library from PyPI. To use it do the following:
bash python-env/env.bash
from the root directory of this project, to create a Python venv.source python-env/venv/bin/activate
to activate the venv.python3 validate.py
.