Blame | Last modification | View Log | Download
program Orbis;var line, Rychlost, Reverz, Zataceni;var Rovinka, a;#define L 1#define S 2#define R 3line:=2;Rovinka:=0;Rychlost:=30; # omezeni rychlosti (hlavne pro ladici ucely)Reverz := 1;Zataceni := 0.75;while truedoif LEYE = 1 and CEYE = 1 then # Cara pod levim sensoremif line = 2 thena:=TIME;LMOT:=-Rychlost; RMOT:=-Rychlost;while TIME < (a + Reverz) do;end;if line = 3 thena:=TIME;RMOT:=-Rychlost;while TIME < (a + Reverz) do;end;LMOT:=0;RMOT:=Rychlost*Zataceni;line:=1; # zaznamenej, kdes videl caruRovinka:=0;continue;end;if REYE = 1 and CEYE = 1 thenif line = 1 thena:=TIME;LMOT:=-Rychlost;RMOT:=-Rychlost;while TIME < (a+Reverz) do;end;if line = 1 thena:=TIME;LMOT:=-Rychlost;while TIME < (a+Reverz) do;end;LMOT:=Rychlost*Zataceni;RMOT:=0;line:=3;Rovinka:=0;continue;end;if CEYE = 1 thenLMOT:=Rychlost;RMOT:=Rychlost;line:=2;Rovinka:= Rovinka +1;continue;end;end;