Advertisement
Guest User

Untitled

a guest
Jul 28th, 2012
205
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Pascal 1.45 KB | None | 0 0
  1. Case wybor of
  2.     1:
  3.        Begin
  4.          Repeat      //O TUTAJ, NAPRAWDE CIEZKO BYLO NA TO WPASC SAMEMU?
  5.            Obramowanie;      //stad do
  6.            Clrscr; 
  7.            x:= 3;
  8.            y:= 3;
  9.            Gotoxy (x,y);
  10.            Writeln (chr(254));
  11.            Obramowanie;
  12.            klawisz:= readkey;
  13.            Case Klawisz of
  14.              'a': dec(x);
  15.              's': inc(y);
  16.              'w': dec(y);
  17.              'd': inc(x);
  18.            End;
  19.            If (x > 24) Then x:= 24;
  20.            If (y > 19) Then y:= 19;
  21.            If (x < 3) Then x:= 3;
  22.            If (y < 3) Then y:= 3;
  23.            If (x = 24) and (y = 19) Then Clrscr;
  24.            Gotoxy (x,y);
  25.            Writeln (chr(254));
  26.            Obramowanie;  //tad mozna do funkcji jest ladniej
  27.  
  28.  
  29.        
  30.          //Repeat    O TEN O REPEAT
  31.            xlos := (3+Random(26));
  32.            ylos := (3+Random(21));
  33.          If ((x = xlos) and (y = ylos)) Then
  34.             Case 1+Random(3) of
  35.             1:
  36.                 If (Pytaj_warianty(q[(1+Random(31))]) = True) Then
  37.                      Dobrze (x,y)          
  38.                 Else
  39.                      Zle (x,y);
  40.             2: 
  41.                 If (Pytaj_odpowiedz(a[(1+Random(23))]) = True) Then
  42.                      Dobrze (x,y)      
  43.                 Else
  44.                      Zle (x,y);
  45.             3: 
  46.                 If (Pytaj_liczba(p[(1+Random(16))]) = True) Then
  47.                     Dobrze (x,y)           
  48.                 Else
  49.                     Zle (x,y);
  50.             End;       
  51.          Until ((x = 26) and (y = 21));
  52.          Clrscr;
  53.       End;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement