public void run() {
        while (keepGoing) {
            if (this.runDFS) {
                this.maze.searchPath = this.dfs.search(this.maze.searchPath,
                        this.maze.size);
            } 
            else if (this.runBFS) {
                this.maze.searchPath = this.bfs.search(this.maze.searchPath,
                        this.maze.size);
            }
            repaint();
            try {
                Thread.sleep(40);
            } 
            catch (InterruptedException ie) {                
            }
        }
    }