Class MazeMaker

java.lang.Object
  extended by MazeMaker

public class MazeMaker
extends java.lang.Object


Field Summary
(package private)  int h
           
(package private)  java.lang.String maz
           
(package private)  Maze maze
           
(package private)  int w
           
(package private)  int[][] walls
           
 
Constructor Summary
MazeMaker(int m, int n)
          Creates a new maze.
 
Method Summary
 void construct()
          Constructs the maze
 void fillwalls()
          Insert all possible walls
 Maze getMaze()
           
 void printwalls()
          Print the connections between the vertices of the maze
 java.lang.String toString()
          Returns the String representing the format of the maze as it would be written to file
 java.io.File write(java.lang.String title)
          Write the maze to file
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

maze

Maze maze

walls

int[][] walls

h

int h

w

int w

maz

java.lang.String maz
Constructor Detail

MazeMaker

public MazeMaker(int m,
                 int n)
Creates a new maze.

Parameters:
m - The width
n - The height
Method Detail

getMaze

public Maze getMaze()
Returns:
The maze associated with this instance

toString

public java.lang.String toString()
Returns the String representing the format of the maze as it would be written to file

Overrides:
toString in class java.lang.Object

construct

public void construct()
Constructs the maze


write

public java.io.File write(java.lang.String title)
                   throws java.io.IOException
Write the maze to file

Parameters:
title - The filename
Returns:
The file
Throws:
java.io.IOException

printwalls

public void printwalls()
Print the connections between the vertices of the maze


fillwalls

public void fillwalls()
Insert all possible walls