protected Direction decide() {
		if (followingWall && rotation == 0) {
			// "When the solver is facing the original direction again,
			// and the angular sum of the turns made is 0,
			// the solver leaves the obstacle and continues
			// moving in its original direction." (Wikipedia)
			followingWall = false;
		}
		
		if (!followingWall) {
			// We have not yet found a wall.
			// Can we go forward?
			if (getPlayerState().canMove(going)) {
				// We can go forward, so let's do it.
				return going;
			} else {
				// We can't go forward, so start following the wall.
				followingWall = true;
				// We want to have the wall on the left, so we turn right.
				right();
			}
		}
		
		
		// We are following a wall.
		// Can we go left?
		if (getPlayerState().canMove(going.left())) {
			// We can go left. So we turn to the left.
			left();
			// And go forward.
			return going;
		} else {
			// Turn right until we can go forward.
			int i = 0;
			while (!getPlayerState().canMove(going)) {
				right();
				i++;
				if (i >= 4) {
					// We cannot move in any way,
					// so let's commit suicide by crashing into a wall.
					// (Technichally, we go in a random impossible direction,
					// which will raise a PlayerCannotMoveException.)
					return going;
				}
			}
			// Go forward.
			return going;
		}
	}