MAZES
Table 7-5. Complete Code for the Travel Maze Script
Code Explanation
<html>
<head>
<title>Travel maze</title> Travel maze
<script type="text/javascript">^
var cwidth = 900;^
var cheight = 350;^
var ctx;^
var everything = [];^
var curwall;^
var wallwidth = 5;^
var wallstyle = "rgb(200,0,200)";^
var walls = [];^
var inmotion = false;^
var unit = 10;^
function Token(sx,sy,rad,stylestring,n) {^
this.sx = sx;^
this.sy = sy;^
this.rad = rad;^
this.draw = drawtoken;^
this.n = n;^