The Essential Guide to HTML5

(Greg DeLong) #1

MAZES


Function Invoked By / Called By Calls


drawtoken drawall using draw method for the token object in the
everything array


movetoken getkeyAndMove using the moveit method for mypent intersect


drawAline drawall using draw method for Wall objects in the
everything array


startwall Invoked by action of an addEventListener call in init drawall


stretchwall Invoked by action of an addEventListener call in init drawall


finish Invoked by action of an addEventListener call in init


getkeyAndMove Invoked by action of an addEventListener call in init movetoken using the
moveit method for mypent


savewalls Invoked by action of onSubmit for the sf form


getwalls Invoked by action of onSubmit for the gf form drawall


Table 7-3 shows the complete code for the maze application, with comments.

Table 7-3. Complete Code for the All-in-one Maze Application

Code Explanation


Opening html tag
Opening head tag
Build maze & travel maze Complete title element