i'm new here an I need help.
First: sorry for my bad English I'm from Germany.
I want to make a Highscore list with 5 cells sorted by >SortD(< for my program Snake on the Algebra FX 2.0+
Can anyone Help me? I can't use if-states thats the reason for the big If-Loops
The sourcecode: Snake
Goto 0 Lbl 2 s+10->S Text 5,30,S if S=2550 Then Goto 3 IfEnd Do Int 46Ran# +46->U Int 26Ran# +26->V LpWhile PxlTest(64-V,U)=1 PlotOn U,V Dsz M For L+1->L to 256 Isz M 'Dont remove this text because Syntax' If M=256 Then 2->M IfEnd Getkey->G If G≠0 Then If G=31 Then Text 1,1,"" Else 0->A~B:IfEnd If G=27 then 1->A Else If G=28 Then 1->B Else If G=38 Then -1->A Else If G=37 Then -1->B IfEnd:IfEnd:IfEnd:IfEnd:IfEnd C+A->C:D+B->D C->List 1[L] D->List 2[L] If C=U And D=V Then Goto 2 Else If PxlTest(64-D,C=1) Then Goto 3 IfEnd:IfEnd PlotOn C,D If L>1 then PlotOff List 1[M],List2[M] IfEnd If L=255 Then 1->L IfEnd Next Lbl 3 ClrText //Thats my Highscore but its not Perfectly. The score in the Cell will be overwrite. Thats wrong. The Highscore must be a real highscore list. I Hope you understand what i mean. If S>0 then if S>List3[1] Then S->List 3[1] Else if S>List3[2] Then S->List 3[2] Else if S>List3[3] Then S->List 3[3] Else if S>List3[4] Then S->List 3[4] Else if S>List3[5] Then S->List 3[5] IfEnd:IfEnd:IfEnd:IfEnd:IfEnd:IfEnd List 3 /| //Display triangle Locate 7,4,"GAME OVER" Locate 1,1,"SCORE:" Locate 7,1,S Locate 4,7,"PLAY AGAIN(Y/N)?" Do:getKey->A LpWhile A=0 If A=32 then Goto 0 Else If A=64 Then Stop IfEnd:IfEnd Lbl 0 ClrText BG-None ClrList 1 ClrList 2 0->A~Z -10->S 45->C 35->D Locate 8,4,"SNAKE"/| //Display Triangle 1->A ViewWindows 1,127,0,1,63,0 F-Line 5,53,5,5 F-Line 5,5,120,5 F-Line 120,5,120,53 F-Line 120,53,5,53 Text 5,5,"SCORE:" Goto 2
Need Help pls!!!!!
Edited by Trinity, 09 May 2014 - 12:26 PM.