This is a tiny text adventure game that can be played in the developer console of a web browser.
The main code for the game is in src/Main.ts
.
The built-in prompt
function is used to ask for player input. It returns null
if the player clicks "Cancel" in the prompt.
To output, we use console
functions:
console.info
: informing the player about their surroundingsconsole.log
: echoing player inputconsole.warn
: asking for player inputconsole.error
: indicating invalid player input
Here is the shortest sequence of winning moves:
west
take key
east
north
open window
east