program Orbis; var line, Rychlost, Reverz, Zataceni; var Rovinka, a; #define L 1 #define S 2 #define R 3 line:=2; Rovinka:=0; Rychlost:=30; # omezeni rychlosti (hlavne pro ladici ucely) Reverz := 0.001; Zataceni := 0.75; while true do if LEYE = 1 and CEYE = 1 then # Cara pod levim sensorem if line = 2 then a:=TIME; LMOT:=-Rychlost; RMOT:=-Rychlost; while TIME < (a + Reverz) do end; end; LMOT:=0;RMOT:=Rychlost*Zataceni; line:=1; # zaznamenej, kdes videl caru Rovinka:=0; continue; end; if REYE = 1 and CEYE = 1 then if line = 2 then a:=TIME; LMOT:=-Rychlost;RMOT:=-Rychlost; while TIME < (a+Reverz) do end; end; LMOT:=Rychlost*Zataceni;RMOT:=0; line:=3; Rovinka:=0; continue; end; if CEYE = 1 then LMOT:=Rychlost;RMOT:=Rychlost; line:=2; Rovinka:= Rovinka +1; continue; end; end;