Guest User

Untitled

a guest
Dec 5th, 2017
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #DEFINE MAXLINES 1000
  2. #DEFINE MAXLINESSECURITYAMOUNT 50
  3.  
  4. dim shared as integer a,b,pu,li,snline(MAXLINES-1,5),ch,frontlinenr,i,ba,bb,big,c,le,l
  5. dim shared as ushort dr,ca(1 to 12000),cb(1 to 12000)
  6. dim shared as uinteger bckcl,lttcl1,lttcl2,lttcl3
  7. bckcl=0
  8. l=1
  9. li=3
  10. a=49
  11. b=239
  12. ba=968
  13. bb=549
  14. big=5
  15.  
  16.  
  17. lttcl1=rgb(250,255,10) ' für Schrift im Menue
  18. lttcl2=rgb(20,120,210) ' für Quadrat und sonstiges
  19. lttcl3=rgb(250,10,45) ' Schrift im Spiel
  20.  
  21. screen 20
  22.  
  23.     If a<50 or a>1000 or b<80 or b>700 then
  24.        
  25.         If a<>0 and b<>0 then
  26.             pset (a,b),bckcl
  27.             draw string (340,50),str(pu),bckcl
  28.             pu=pu-10
  29.             draw string (340,50),str(pu),lttcl3
  30.             print "li vor subtraktion:";li
  31.             li=li-1
  32.             print "li nach subtraktion:";li
  33.             Print "nach li=li-1"
  34.             sleep
  35.            
  36.             snline(frontlinenr,2)=a
  37.             snline(frontlinenr,3)=b
  38.            
  39.             'Der Ort des letzten Punktes wird zum Endpunkt, sonst kommt die Linie durcheinander
  40.             'Operation muss vor einem Sprung zum Label outofb geschehen, da bei outofb die Variablen
  41.             'a und b umdefiniert werden
  42.             '
  43.             'Problem:Frontlinenr wird scheinbar nicht erhöht, wenn Schlange auftrifft
  44.            
  45.             print "vor if:",li
  46.            
  47.             If li<=0 then
  48.                 print "in if:",li
  49.                
  50.                
  51.                 draw string (470,150),"THE END 2",lttcl2
  52.                
  53.                 if ch=2 and le=0 then print "hier war mal sprungbefehl goto tet2"
  54.                
  55.                
  56.                 print "hier war mal sprungbefehl goto tet"
  57.                 sleep
  58.             end if
  59.            
  60.             for i=1 to l
  61.                 pset (ca(i),cb(i)),lttcl2
  62.             next
  63.             line (ba,bb)-(ba+big,bb+big),lttcl2,bF
  64.             print "hier war mal sprungbefehl goto outofb"
  65.  
  66.         end if
  67.            
  68.            
  69.         a=500
  70.         b=500
  71.        
  72.         print "vor if-anweisung"
  73.        
  74.         'Das Linienmanagement muss eine neue Linie anlegen
  75.         if frontlinenr<(MAXLINES-MAXLINESSECURITYAMOUNT) then
  76.             print "frontlinenr nach aufprall erhoeht von ";frontlinenr;
  77.             frontlinenr=frontlinenr+1
  78.             print " auf ";frontlinenr;
  79.             snline(frontlinenr,0)=a
  80.             snline(frontlinenr,1)=b
  81.         elseif snline (0,0)=0 then
  82.             print "frontlinenr nach aufprall geaendert von ";frontlinenr;
  83.             frontlinenr=0
  84.             print " auf ";frontlinenr;
  85.             snline(frontlinenr,0)=a
  86.             snline(frontlinenr,1)=b
  87.         else
  88.             Print "Fehler beim Linienmanagement! Zu viele Linien. Taste druecken zum Beenden."
  89.             end
  90.         end if
  91.         snline(frontlinenr,2)=a
  92.         snline(frontlinenr,3)=b
  93.         snline(frontlinenr,4)=c
  94.     end if
  95. '    end if
  96.  
  97. sleep
  98. end
Add Comment
Please, Sign In to add comment