private void performYellow(Foor foor, String cicle) { if (cicle.equals("down")) { foor.vahetaKollast(); foor.paus(0.5); foor.vahetaKollast(); foor.vahetaPunast(); } else if (cicle.equals("up")) { foor.vahetaKollast(); foor.paus(0.5); foor.vahetaKollast(); } }
private void performGreen(Foor foor) { foor.vahetaRohelist(); foor.paus(1.0); foor.vahetaRohelist(); for (int i = 0; i < 6; i++) { foor.vahetaRohelist(); foor.paus(0.5); } foor.vahetaRohelist(); }
private void performRed(Foor foor) { foor.vahetaPunast(); foor.paus(3); }
public void tsykkel(Foor foor, int suund) { int count = suund; while (count < 10) { if (count != 0) { foor.vahetaRohelist(); foor.paus(0.5); foor.vahetaRohelist(); foor.paus(0.5); foor.vahetaRohelist(); foor.paus(0.5); foor.vahetaRohelist(); foor.paus(0.5); foor.vahetaKollast(); foor.paus(0.5); foor.vahetaKollast(); foor.paus(0.5); foor.vahetaPunast(); foor.paus(1.5); foor.vahetaPunast(); foor.paus(0.5); } foor.vahetaPunast(); foor.paus(1.5); foor.vahetaPunast(); foor.paus(0.5); foor.vahetaKollast(); foor.paus(0.5); foor.vahetaKollast(); foor.paus(0.5); foor.vahetaRohelist(); foor.paus(0.5); foor.vahetaRohelist(); foor.paus(0.5); foor.vahetaRohelist(); foor.paus(0.5); foor.vahetaRohelist(); foor.paus(0.5); count++; } }