@Override
	public void action() {
		RConsole.println("Ball Has been detected");
		// TODO Auto-generated method stub
		int increased = 0;
		Color colorSensed = Sputnik.colorSensor.getColor();
		int blue = colorSensed.getBlue();
		int red = colorSensed.getRed();
		while (blue > 80 || red > 80) {
			PathFollowing.ball = true;
			Sputnik.pilot.stop();
			detectedBalls++;
			if (blue > 80) {
				Sound.buzz();
				Sputnik.robotMap.setBall();

			} else if (red > 80) {
				Sound.beepSequenceUp();
				Sputnik.robotMap.setBall();
				if (increased == 0) {
					count_red++;
					if (count_red == 1) {
						System.exit(0);
					}
					increased = 1;
				}
			}
			Thread.yield();
			colorSensed = Sputnik.colorSensor.getColor();
			blue = colorSensed.getBlue();
			red = colorSensed.getRed();
		}
	}