Subversion Repositories svnkaklik

Rev

Rev 279 | Go to most recent revision | Details | Last modification | View Log

Rev Author Line No. Line
276 kaklik 1
program Callis;
2
 
3
var movement, line;
4
 
5
#define L 1
6
#define S 2
7
#define R 3
8
 
9
line:=2;
10
 
11
while true
12
do
13
  if LEYE > 0 or CEYE > 0 then		# Cara pod levim sensorem
14
    LMOT:=30;RMOT:=30;	# jed rovne
15
    line:=1;		# zaznamenej, kdes videl caru
16
    continue;
17
  end;
18
 
19
  if REYE > 0 or CEYE > 0 then
20
    LMOT:=30;RMOT:=30;
21
    line:=3;
22
    continue;
23
  end;
24
 
25
  if line=1 then 
26
    LMOT:=0;
27
    movement:=1;
28
    break;
29
 
30
  elif line=3 then
31
    RMOT:=0;
32
    movement:=3;
33
    break;
34
  end;
35
end;