PHP code example of rvilbrandt / gamebook
1. Go to this page and download the library: Download rvilbrandt/gamebook library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rvilbrandt / gamebook example snippets
json
{
"id": "door_2_key_taken",
"contents": [
{
"text": "You've put the key into your pocket."
}
],
"options": [
{
"text": "Leave the room.",
"jumpTo": "beginning"
}
],
"inventory": {
"add": [
"key"
]
}
}