create readme and deno.json file

This commit is contained in:
2025-07-22 17:52:24 -07:00
parent 08ee3d1b5d
commit aece40be60
2 changed files with 38 additions and 0 deletions

5
deno.json Normal file
View File

@ -0,0 +1,5 @@
{
"tasks": {
"start": "deno main.ts"
}
}

33
readme.md Normal file
View File

@ -0,0 +1,33 @@
# Detective
Detective is a JavaScript (Deno) program for writing and running interactive
fiction. The writer creates a JSON document with a specific structure that
describes rooms, objects, events, etc. They can then run the program with Deno
and play through the result.
## Installation
Detective is written for [Deno](https://deno.com), which is required. See
installation instructions
[here](https://docs.deno.com/runtime/getting_started/installation).
Once you have Deno and the repo, you can run `deno task start` from inside the
project, and the little demo story should start.
## Commands
Currently, the commands are very simple.
`inventory` checks the players inventory.
`go {direction}` moves the player in the given direction.
`take {item}` picks up the given item.
`use {item}` uses the given item.
`quit` exits the program.
## Writing your own story
The format for the JSON file is shown in more detail in the