Rev 277 | Rev 280 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download
program Orbis;var line, movement, Rychlost;#define L 1#define S 2#define R 3line:=2;Rychlost:=15; # omezeni rychlosti (hlavne pro ladici ucely)while truedoif LEYE = 1 and CEYE = 1 and REYE = 0 thenLMOT:=-1;RMOT:=Rychlost*0.75; # jed rovneline:=1; # zaznamenej, kdes videl carumovement:=1;continue;end;if LEYE = 0 and CEYE = 1 and REYE = 1 thenLMOT:=Rychlost*0.75;RMOT:=-1;line:=3;movement:=3;continue;end;if LEYE = 1 and CEYE = 0 and REYE = 0 thenLMOT:=-Rychlost/2;RMOT:=Rychlost; # jed rovneline:=1; # zaznamenej, kdes videl carumovement:=1;continue;end;if LEYE = 0 and CEYE = 0 and REYE = 1 thenLMOT:=Rychlost;RMOT:=-Rychlost/2;line:=3;movement:=3;continue;end;if (LEYE = 0 and CEYE = 1 and REYE = 0) thenLMOT:=Rychlost;RMOT:=Rychlost;line:=2;movement:=2;continue;end;if (LEYE = 1 and CEYE = 1 and REYE = 1) thenif movement = 1 thenLMOT:=Rychlost;RMOT:=0;line:=2;# break;elif movement = 2 thenLMOT:=Rychlost;RMOT:=Rychlost;line:=2;# break;elif movement = 3 thenLMOT:=0;RMOT:=Rychlost;line:=2;end;end;if (LEYE = 0 and CEYE = 0 and REYE = 0) thenif line = 1 thenLMOT:=0;RMOT:=Rychlost;line:=2;movement:=1;elif movement = 3 thenLMOT:=Rychlost;RMOT:=0;line:=2;movement:=3;end;end;end;