Subversion Repositories svnkaklik

Rev

Rev 276 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log

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