Subversion Repositories svnkaklik

Rev

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

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