*/
    public boolean step() {
	// if there are no more GenChains in chains, return false
	// signifying that the maze is complete
	if (this.chains.size() == 0) return false;
	
	// if the most recent added GenChain has carved 'frequency' number
	// of Cells, get the newest Cell it can continue from, and start a
	// new GenChain from that cell, adding it to chains. If the GenChain
	// has no cells it can continue from, remove it from chains
	if (this.chains.get(this.chains.size()-1).getLength() >= currentLength) {
	    Cell continuableCell = this.chains.get(this.chains.size()-1).newestContinuableCell();
	    if (continuableCell == null)
		this.removeNewestChain();
	    else {
		this.chains.add(new GenChain(this.grid, continuableCell));
		this.currentLength = (int)(frequency - frequencyFlux + (Math.random()*frequencyFlux*2));
	    }
	}

        // call stepNew and stepOld on the newest added GenChain. If the
	// GenChain cannot step any further in either direction, remove it
	if (this.chains.size() > 0 && !(this.chains.get(this.chains.size()-1).stepNew() | this.chains.get(this.chains.size()-1).stepOld()))
	    this.removeNewestChain();
	
	// return true if there are still GenChains in chains (a.k.a. chains the
	// generator can dontinue off of), false otherwise (a.k.a. the generator
	// has completed carving the maze into the MazeGrid
	//In that case, mark start and finish
	return (this.chains.size() > 0);
    }