public void determineBestAction() {
		if (this.detectPlayer()) {
			this.attack(player);
		} else if (this.detectPlayerRange()) {
			Path p = new Path(game.getMaze(), this.location, player.location);
			if (p.getNumTurns() < 3) {
				this.setLocation(this.location.getNeighbors()[p.getDirArray()
						.get(0)]);
				this.move(p.getDirArray().get(0)); // moves the creature one
													// space towards the player
			}

		} else {
			Random random = new Random();
			int i = random.nextInt(4);
			if (!this.location.getWalls()[i]
					&& this.location.getNeighbors()[i] != null) {
				this.setLocation(this.location.getNeighbors()[i]);
				this.move(i);
			} else {
				this.determineBestAction();
			}
		}
	}