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