public void run() {
			int counter = 0;
			while (!maze.allRatsOnTarget()
					&& counter < maze.getMaxSimulationStep()) {
				for (MazeRat rat : maze.getRats()) {
					if (!maze.isRatOnTarget(rat))
						rat.performStep();
				}
				mazePanel.repaint();
				try {
					Thread.sleep(100);
				} catch (InterruptedException e) {
					e.printStackTrace();
				}
				counter++;
			}

			System.out.println("Finished simulation!");
			if (maze.allRatsOnTarget()) {
				System.out.println("Rats finished! It took " + counter
						+ " steps");
			} else {
				System.out.println("Rats failed");
			}
		}