Java Mazes

You are in a 7x7 maze, in the south west corner, trying to go to the north east corner. You start out faceing south. The keys of use are:
 key    in the maze    top view
-----  -------------  ----------
-> l    turn right     east
<- j    turn left      west

 ^ i    go forward     north
 |  
 
 | k    go backward    south
 v
 
home: go back to the NW corner.
end:  new maze.
If you reach the end (marked with an 'x' on the floor), you will get moved back to the start, and a new maze will be generated.
You need java to view this amazeing applet.

To Do


params

n_col/n_row
The number of cols/rows in the maze
(default: 5)
topview
In the maze(false) vs birds eye view(true)
(default false)
start_col/start_row
The starting spot (x,y)
(default cartesian NW corner (0,maxy))
end_col/end_row
The ending spot (x,y)
(default cartesian SE corner (maxx,maxy))
cells
A string describing the world. The string consists of [BLTN].
A room with a west and north wall would be Both
A room with a west and no north wall would be Left
A room with no west and a north wall would be Top
A room with neither a north nor west wall would be Neither
The south and east walls can be derived from ajacent rooms. The southmost wall and east most walls are assumed to exist. The examples will show you better how it works.

Some other examples:


Source:

Note Bene:
This started as an assignment for cs 538, a class in programing languages. I liked java, I like mazes (I still mean to write one for CGI) so I kept enhanceing upon it. To keep with some backward compatability with the proff's format, well, thats why the names are done the way they are. The coord system is also a bit messy useing the more cartesian system of 0,0 being in the lower left, x increasing to the east, y increasing going north. I personaly prefer the more CS version with 0,0 being in the upper left, x increaseing to the east, y increaseing going south. Thus in the code you will see it reading in the cartesian system and being represented internaly in my system. I will eventualy re-write this to accept one standard or the other rather than switching between the two.


back to applets
m_turner@dax.cs.wisc.edu