X-Git-Url: http://git.subgeniuskitty.com/vvhitespace/.git/blobdiff_plain/e3dfa9e4d24186cdb143ca6e05d54448049a564f..07331ceeb01f6045ddf02e0aba05752ef1ea8838:/examples/hunt-the-wumpus/wump.pvvs diff --git a/examples/hunt-the-wumpus/wump.pvvs b/examples/hunt-the-wumpus/wump.pvvs new file mode 100644 index 0000000..01284a9 --- /dev/null +++ b/examples/hunt-the-wumpus/wump.pvvs @@ -0,0 +1,40 @@ +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ +@ Hunt the Wumpus +@ (c) 2019 Aaron Taylor +@ See LICENSE.txt file for copyright and license details. +@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ + +NSNTSSSSSSSN | JMP > 10000000 (wump) + +#include +#include +#include +#include + +NSSVTSSSSSSSN | MARK: 10000000 (wump) + +@ Initialization (build the cave, etc). +NSTTSSSSSTSN | JSR > 10000010 (wump_init) + +@ Does the user need instructions? +A"Instructions? (y/n)\n" +SSSSN | PUSH 0 (number of string substitutions) +NSTTSSSN | JSR > 1000 (printf) +NSTTSSTTSSSN | JSR > 10011000 (get_answer) +NTSTSSSSSSSSSSSSSSSN | BRZ > 10000000 00000000 (skip_instructions) +NSTTTTTTTTTSSSSTSSTN | JSR > 11111111 00001001 (instructions) +SSSSN | PUSH 0 (number of string substitutions) +NSTTSSSN | JSR > 1000 (printf) +NSSVTSSSSSSSSSSSSSSSN | MARK: 10000000 00000000 (skip_instructions) + +@ Print a description of the cave. +NSTTSSTTSTTN | JSR > 10011011 (print_cave_description) + +@ Main game loop +NSSVTSSTTSTSN | MARK: 10011010 (wump_loop) +NSTTSTSSSSTN | JSR > 10100001 (print_room_stats) +A"Move or shoot? (m/s)\n" +SSSSN | PUSH 0 (number of string substitutions) +NSTTSSSN | JSR > 1000 (printf) +NSTTSTSSSTSN | JSR > 10100010 (move_or_shoot) +NSNTSSTTSTSN | JMP > 10011010 (wump_loop)