Subversion Repositories svnkaklik

Rev

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

Rev Author Line No. Line
280 kaklik 1
#navaznost na verzi 277
2
 
3
program Orbis;
4
 
5
var line, movement, Rychlost;
6
 
7
#define L 1
8
#define S 2
9
#define R 3
10
 
11
line:=2;
12
 
13
Rychlost:=15;		# omezeni rychlosti (hlavne pro ladici ucely)
14
 
15
while true
16
do
17
  if LEYE = 1 and CEYE = 1 and REYE = 0 then 
18
    LMOT:=0;RMOT:=Rychlost;			# jed rovne
19
    line:=1;		# zaznamenej, kdes videl caru
20
    movement:=1;
21
    continue;
22
  end;
23
 
24
  if LEYE = 0 and CEYE = 1 and REYE = 1 then 
25
    LMOT:=Rychlost;RMOT:=Rychlost;
26
    line:=3;
27
    movement:=2;
28
    continue;
29
  end;
30
 
31
  if LEYE = 1 and CEYE = 0 and REYE = 0 then 
32
    LMOT:=0;RMOT:=Rychlost;			# jed rovne
33
    line:=1;		# zaznamenej, kdes videl caru
34
    movement:=1;
35
    continue;
36
  end;
37
 
38
  if LEYE = 0 and CEYE = 0 and REYE = 1 then 
39
    LMOT:=Rychlost;RMOT:=0;
40
    line:=3;
41
    movement:=3;
42
    continue;
43
  end;
44
 
45
  if (LEYE = 0 and CEYE = 1 and REYE = 0) then 
46
    LMOT:=Rychlost;RMOT:=Rychlost;
47
    line:=2;
48
    movement:=2;
49
    continue;
50
  end;
51
 
52
  if (LEYE = 1 and CEYE = 1 and REYE = 1) then 
53
    LMOT:=0;RMOT:=Rychlost;
54
    line:=2;
55
    movement:=1;
56
    continue;
57
  end;
58
 
59
  if (LEYE = 0 and CEYE = 0 and REYE = 0) then 
60
      LMOT:=Rychlost;RMOT:=0;
61
      line:=2;
62
      movement:=3;
63
  end;    
64
end;