Subversion Repositories svnkaklik

Compare Revisions

Ignore whitespace Rev 277 → Rev 276

/programy/Robsim/Robiada2007/kaklik.lab
1,6 → 1,6
program Orbis;
 
var line, movement, Rychlost;
var line, Rychlost;
 
#define L 1
#define S 2
12,51 → 12,22
 
while true
do
if LEYE = 1 and CEYE = 1 and REYE = 0 then
if LEYE > 0 and CEYE > 0 then # Cara pod levim sensorem
LMOT:=0;RMOT:=Rychlost; # jed rovne
line:=1; # zaznamenej, kdes videl caru
movement:=1;
continue;
end;
 
if LEYE = 0 and CEYE = 1 and REYE = 1 then
LMOT:=Rychlost;RMOT:=Rychlost;
line:=3;
movement:=2;
continue;
end;
 
if LEYE = 1 and CEYE = 0 and REYE = 0 then
LMOT:=0;RMOT:=Rychlost; # jed rovne
line:=1; # zaznamenej, kdes videl caru
movement:=1;
continue;
end;
 
if LEYE = 0 and CEYE = 0 and REYE = 1 then
if REYE > 0 and CEYE > 0 then
LMOT:=Rychlost;RMOT:=0;
line:=3;
movement:=3;
continue;
end;
 
if (LEYE = 0 and CEYE = 1 and REYE = 0) then
LMOT:=0;RMOT:=Rychlost;
if CEYE > 0 then
LMOT:=Rychlost;RMOT:=Rychlost;
line:=2;
movement:=1;
continue;
end;
 
if (LEYE = 1 and CEYE = 1 and REYE = 1) then
LMOT:=0;RMOT:=Rychlost;
line:=2;
movement:=1;
continue;
end;
 
if (LEYE = 0 and CEYE = 0 and REYE = 0) then
LMOT:=Rychlost;RMOT:=0;
line:=2;
movement:=3;
end;
end;