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(); } }
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++; } }