Serialized Form


Package cmsc433.p3

Class cmsc433.p3.Maze extends java.lang.Object implements Serializable

serialVersionUID: 1L

Serialization Methods

readObject

private void readObject(java.io.ObjectInputStream in)
                 throws java.io.IOException,
                        java.lang.ClassNotFoundException
Throws:
java.io.IOException
java.lang.ClassNotFoundException

writeObject

private void writeObject(java.io.ObjectOutputStream out)
                  throws java.io.IOException
Throws:
java.io.IOException
Serialized Fields

maze

java.util.concurrent.atomic.AtomicIntegerArray maze

The maze is a 2 dimensional array of atomic integers encoded as an AtomicIntegerArray. The upper-left, or north-western corner of the maze is given by maze.get(0). The lower-right, or south-eastern corner of the maze is maze.get(maze.length()-1). The maze is stored in row-major order, so the element at row n, column m is given by maze.get(n * width + m).

The entrance to the maze is at row: 0, column: width/2. The exit is at row: height-1, column: width/2.

Individual bits of each byte in the "maze" array are used to encode information about that cell of the maze. Only the low-order 8 bits are used. The designated bits are:

  CCSSEEse

and have the following meaning

CC
marks two bits that are used to give a color to this cell in the maze. Each of the four bit combinations corresponds to a different color that will be used by the MazeDisplay object when drawing this cell. This can be used by your code to provide visual feedback on solving progress or for debugging.
SS
marks two bits that are used to give a color to the southern side of this cell.
EE
marks two bits that are used to give a color to the eastern side of this cell.
s
Set to 1 if there is a wall to the SOUTH.
e
Set to 1 if there is a wall to the EAST.

There is always a wall to the south of cells on the southern border of the maze. There is always a wall to the east of cells on the eastern border of the maze. There is an implicit wall to the north of cells on the northern border and to the west of cells on the western border.


width

int width

height

int height

Class cmsc433.p3.MazeDisplay extends javax.swing.JPanel implements Serializable

Serialized Fields

maze

Maze maze

lock

java.lang.Object lock

numFound

int numFound

numDrawn

int numDrawn

cellTypes

java.util.Hashtable<K,V> cellTypes

Class cmsc433.p3.SkippingMazeSolver.SolutionFound extends java.lang.Exception implements Serializable

Serialized Fields

pos

Position pos

from

Direction from