Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #DEFINE MAXLINES 1000
- #DEFINE MAXLINESSECURITYAMOUNT 50
- dim shared as integer a,b,pu,li,snline(MAXLINES-1,5),ch,frontlinenr,i,ba,bb,big,c,le,l
- dim shared as ushort dr,ca(1 to 12000),cb(1 to 12000)
- dim shared as uinteger bckcl,lttcl1,lttcl2,lttcl3
- bckcl=0
- l=1
- li=3
- a=49
- b=239
- ba=968
- bb=549
- big=5
- lttcl1=rgb(250,255,10) ' für Schrift im Menue
- lttcl2=rgb(20,120,210) ' für Quadrat und sonstiges
- lttcl3=rgb(250,10,45) ' Schrift im Spiel
- screen 20
- If a<50 or a>1000 or b<80 or b>700 then
- If a<>0 and b<>0 then
- pset (a,b),bckcl
- draw string (340,50),str(pu),bckcl
- pu=pu-10
- draw string (340,50),str(pu),lttcl3
- print "li vor subtraktion:";li
- li=li-1
- print "li nach subtraktion:";li
- Print "nach li=li-1"
- sleep
- snline(frontlinenr,2)=a
- snline(frontlinenr,3)=b
- 'Der Ort des letzten Punktes wird zum Endpunkt, sonst kommt die Linie durcheinander
- 'Operation muss vor einem Sprung zum Label outofb geschehen, da bei outofb die Variablen
- 'a und b umdefiniert werden
- '
- 'Problem:Frontlinenr wird scheinbar nicht erhöht, wenn Schlange auftrifft
- print "vor if:",li
- If li<=0 then
- print "in if:",li
- draw string (470,150),"THE END 2",lttcl2
- if ch=2 and le=0 then print "hier war mal sprungbefehl goto tet2"
- print "hier war mal sprungbefehl goto tet"
- sleep
- end if
- for i=1 to l
- pset (ca(i),cb(i)),lttcl2
- next
- line (ba,bb)-(ba+big,bb+big),lttcl2,bF
- print "hier war mal sprungbefehl goto outofb"
- end if
- a=500
- b=500
- print "vor if-anweisung"
- 'Das Linienmanagement muss eine neue Linie anlegen
- if frontlinenr<(MAXLINES-MAXLINESSECURITYAMOUNT) then
- print "frontlinenr nach aufprall erhoeht von ";frontlinenr;
- frontlinenr=frontlinenr+1
- print " auf ";frontlinenr;
- snline(frontlinenr,0)=a
- snline(frontlinenr,1)=b
- elseif snline (0,0)=0 then
- print "frontlinenr nach aufprall geaendert von ";frontlinenr;
- frontlinenr=0
- print " auf ";frontlinenr;
- snline(frontlinenr,0)=a
- snline(frontlinenr,1)=b
- else
- Print "Fehler beim Linienmanagement! Zu viele Linien. Taste druecken zum Beenden."
- end
- end if
- snline(frontlinenr,2)=a
- snline(frontlinenr,3)=b
- snline(frontlinenr,4)=c
- end if
- ' end if
- sleep
- end
Add Comment
Please, Sign In to add comment