Added ability for player to move around the tunnels in Wumpus.
[vvhitespace] / examples / wump / wump.pvvs
CommitLineData
2da74194
AT
1@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
2@ Hunt the Wumpus
3@ (c) 2019 Aaron Taylor <ataylor at subgeniuskitty dot com>
4@ See LICENSE.txt file for copyright and license details.
5@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
6
7NSNTSSSSSSSN | JMP > 10000000 (wump)
8
9#include <wump_init.pvvs>
10#include <wump_ui.pvvs>
11#include <wump_strings.pvvs>
12#include <stdio.pvvs>
13
14NSSVTSSSSSSSN | MARK: 10000000 (wump)
15
16@ Initialization (build the cave, etc).
17NSTTSSSSSTSN | JSR > 10000010 (wump_init)
18
19@ Does the user need instructions?
20A"Instructions? (y/n)\n"
21SSSSN | PUSH 0 (number of string substitutions)
22NSTTSSSN | JSR > 1000 (printf)
23NSTTSSTTSSSN | JSR > 10011000 (get_answer)
24NTSTSSSSSSSSSSSSSSSN | BRZ > 10000000 00000000 (skip_instructions)
25NSTTTTTTTTTSSSSTSSTN | JSR > 11111111 00001001 (instructions)
26SSSSN | PUSH 0 (number of string substitutions)
27NSTTSSSN | JSR > 1000 (printf)
28NSSVTSSSSSSSSSSSSSSSN | MARK: 10000000 00000000 (skip_instructions)
29
30@ Print a description of the cave.
31NSTTSSTTSTTN | JSR > 10011011 (print_cave_description)
32
33@ Main game loop
34NSSVTSSTTSTSN | MARK: 10011010 (wump_loop)
35NSTTSTSSSSTN | JSR > 10100001 (print_room_stats)
28a945f7 36A"Move or shoot? (m/s)\n"
f0e3023d
AT
37SSSSN | PUSH 0 (number of string substitutions)
38NSTTSSSN | JSR > 1000 (printf)
39NSTTSTSSSTSN | JSR > 10100010 (move_or_shoot)
40NSNTSSTTSTSN | JMP > 10011010 (wump_loop)