NUMAZE
======
By Ken Pettit, 2018

Contents
========
 - Introduction
 - Files
 - Key Definitions
 - Game Play
 - Emulation

Introduction
============
This is a  Number Maze for the TRS-80 Model 200 adhering to the PUR-120 category 
of the "10-Liner" BASIC competition.  Sorry, Model 100 not supported due to 
limited code space availability imposed by the PUR-120 classification.  The goal 
of NUMAZE it to navigate your way (left to right) through a maze of randomly 
generated numbers until you escape the maze at the right edge.

Files
=====
 - README         This file.
 - NUMAZE.BA      Tokenized BASIC program for loading to the emulation.
 - NUMAZE.DO      ASCII text listing of the NUMAZE.BA program.
 - NUMAZELONG.DO  NUMAZE program split into 1 operation per line with commenting.
 - NUMAZE.png     Screenshot of NUMAZE being played (with modified VirtualT colors).

Key Definitions
===============
 'u' or 'k':   Move UP
 'd' or 'j':   Move DOWN
 'e':          Enter the maze at the chosen location
 'r':          Retry current maze from the beginning
 'q':          Quit (no confirmation requested)

Game Play
=========
- Use the UP/DOWN keys above to choose a starting point at the left edge of the maze.
  The cursor will wrap top to bottom / bottom to top at this stage.
- Press 'e' to enter the maze at the chosen location.
- Guide your way through the number maze by choosing either UP or DOWN.  The cursor
  will move the chosen direction a distance (lines) equaling the number that the cursor 
  is pointing to within the maze.
- Moves must alternate between EVEN and ODD numbers.
- You must stay within the bounds of the maze. No wrapping from top to bottom or
  bottom to top.
- If you land on a number with no valid moves based on EVEN/ODD rule, then you have
  reached a dead-end in the maze and must 'r'etry.
- There is always at least one solution through the maze guaranteed by design.
- There is an invisible column of numbers at the far right of the maze.  When you
  are at the far right visible column, you must choose UP or DOWN to actually find 
  the exit.  Sometimes you can make it all the way to the right edge "wall" and not 
  have an exit.  This means you took the wrong path.
- There are 128 different mazes based on the random number seeding (the POKE/PEEK
  in the code).  Given a tiny bit more code space, this could have been increased to 
  1660 different mazes.  This would be done by adding an additional POKE/PEEK:
     
      POKE-2258,PEEK(-3552)

Emulation
=========
To play this game, a Model 200 Emulator is required.  This means downloading the
VirtualT emulator (supports Model 100/102/200/NEC/KC-85).  The VirtualT emulator
can be downloaded from:
 
   http://www.sourceforge.net/projects/virtualt

It is recommended to use the Windows version of VirtualT for minimal issues with
setup.  Sometimes the Linux versions can be a bit fussy based on installed 
packages as VirtualT is not distributed as a package with dependencies identified
(i.e. is a simple tgz file vs. rpm and so doesn't use a pacakge manager).

Follow these steps:
1.  Download VirtualT using the link above and unzip.
2.  Launch VirtualT by double-clicking on the virtualt.exe application.  The 
    application must be launched from within it's directory so that it can
    find the ROMs for the chosen model.
3.  Use the Emulation->Display menu to choose "Solid Chars" and to selected 
    your preferred display size (2x, 3x, 4x).
4.  You can also choose preferred display colors from the Emulation->Display menu.
    To do this, simply press on the small colored square beside each color category
    withing the dialog box that appears and then choose a new color from the 
    popup selection palette.  Use the Preview and OK buttons to select.
5.  Choose Model 200 (T200) emulation mode using the Emulation->Model menu.  This
    will change the emulation to the T200's larger 16-Line LCD display.
6.  Choose an emulation speed via the Emulation->Speed menu.  For realiztic speed
    emulation (i.e. slow), choose 2.4MHz.  For faster response times, choose any 
    of the other higher-speed emulation modes.  This game is not emulation speed
    sensitive.
7.  Load the NUMAZE.BA file:
     a.  From the File menu, choose "Load file from HD".
     b.  Browse to and select the NUMAZE.BA file.
8.  From the T200 main Menu, use the arrow keys to move the cursor to the NUMAZE
    game and hit enter (or simply double-click on the NUMAZE program using the
    mouse).
9.  You are now playing the game.
10. You can use 'q' to exit or CTRL-C.  To return to the T200 main menu screen,
    press F8 from the OK prompt or type "menu" and hit enter.
11. Exit VirtualT in the normal manner apps are exited and it will save you RAM
    contents to a file on the host.  The next time you launch VirtualT, the
    NUMAZE application will already be loaded.
12. Enjoy!

