Maze Applet

This applet randomly constructs a 'perfect' maze, where 'perfect' means that not only is the maze solvable, and well-connected such that any point within it is reachable from any other point, the maze also contains no loops. In other words, the solvable path between any to points is unique. The user begins at the start (S) position, and should use the Arrow Keys to navigate through the maze (note that before the Arrow Keys will work, the user must mouse-click in the applet once). The HOME key positions the user's dot back at the 'S'; the END key positions the dot at the finish (F) point (but does not show the solving path).

.תדלקמב םיציחה ישקמ לע הציחל י"ע לעופ קחשמה .תילגנאב ןה הלעפהה תוארוה
.קחשל וליחתה זאו ,רבכעה םע טלפאה לע םדוק וצחל
.רוקמה רתאמ ןאכ וקתעוה םירטמרפה לע םירבסה ןכו הלעפהל ץוחנה דוקה

You should find the following classes :

If you add the applet to one of you pages, you may add the example to my LINKS page.

Parameters

Below are descriptions of all the parameters you may use to customize the applets to your webpages. Be sure to enclose any parameters that contain white space in double-quotation marks. Most parameters have default values in case you do not specify your own values, but the first two parameters (AUTHOR and COPYRIGHT) are necessary. If you are not sure how to incorporate an applet into a webpage (with its parameter names and values), looks at the source of this webpage and the applet embedded for an example, or read the FAQ page.

  • AUTHOR: This parameter must appear exactly as follows:
    <param name=AUTHOR value="Eric Harshbarger, http://www.ericharshbarger.org">
    

  • COPYRIGHT: This parameter must appear exactly as follows:
    <param name=COPYRIGHT value="MazeApplet applet, Copyright 1998, Eric Harshbarger">

  • BGCOLOR: This parameter indicates the background color of the applet. Consult the FAQ page if you are unsure what format to use for the parameter's value.

  • FGCOLOR: This parameter indicates the foreground color of the applet. Consult the FAQ page if you are unsure what format to use for the parameter's value.

  • DOT.COLOR: This is the color of the dot and path of the user as he/she moves about the maze

  • FONTNAME: This value indicates the fontface used by the applet. Java1.0.2 has the following values from which to choose (must be spelled exactly): TimesRoman, Dialog, Courier, Helvetica, DialogInput, Symbol.

  • FONTSIZE: This value indicates the size of the font used by the applet.

  • FONTSTYLE: This value indicates the style of the font used by the applet. The value should be one of the following: plain, bold, italic, bolditalic.

  • COLUMNS: This parameter indicates the number of columns in the maze. To ensure that the whole maze will be visible the applet's width should be at least CELLSIZE * COLUMNS + 1.

  • ROWS: This parameter indicates the number of columns in the maze. To ensure that the whole maze will be visible the applet's height should be at least CELLSIZE * ROWS + 1.

  • CELLSIZE: This is the number of pixels for the dimensions of each square 'cell' of the maze.

  • START.POINT: This indicates the starting point (or 'cell') in which the user's dot begins. The default is '0, 0' (the upper left corner -- note that the point coordinates are zero-indexed).

  • FINISH.POINT: This indicates the finishing point (or 'cell') in which the user's dot begins. The default is 'COLUMNS - 1, ROWS - 1' (the lower right corner).



    APPLET DEPOT: INTRO - NEWS - APPLETS - DEMOS - SOURCE - CUSTOM - FORUM - LINKS - FAQ - EMAIL
    The Applet Depot and all associated applets, text, scripts, and images, Copyright © 1998-2000 by Eric Harshbarger unless otherwise noted. 'Java' is a registered trademark of Sun Microsystems Incorporated.