After trying to help someone over at Cemetech with their code, I decided to try making my own entire version of the game they're trying to port for the CE. That game is loopover.xyz, and though I can't seem to solve the actual puzzle myself, I'm pretty happy with my code here, coming in at just 104 lines. I attempted keeping it to 100, but went a bit over after choosing to put in Else statements for whatever minuscule speed boost I could get. See if you can optimize it more if you want :P
This comes with both a timer and a high score feature.
You can move the rows and columns with the arrow keys, and you can move the pointers on the sides of the board with mode, alpha, XTθn, and stat
You can copy and paste this into sourcecoder to try it out if you like, or download it here: http://ceme.tech/DL1955
ClrHome
"ABCDEFGHIJKLMNOPQRSTUVWXY->Str1
Ans->Str2
randIntNoRep(1,25->L1
sub(Str1,Ans(1),1
For(N,2,25
Ans+sub(Str1,L1(N),1
If not(remainder(N,5
Output(2+N/5,4,sub(Ans,N-4,5
End
Ans->Str1
4->A
Ans->B
DelVar TDelVar KSetUpEditor LOOP
UnArchive |LLOOP
If not(dim(|LLOOP
{0->|LLOOP
"*
Output(3,3,Ans
Output(2,4,Ans
Output(3,9,Ans
Output(8,4,Ans
Output(2,18,"Time:
Output(7,18,"High:
timeCnv(sum(|LLOOP
Output(8,18,"n/a
If sum(Ans
Output(8,18,toString(Ans(3))+"m"+toString(Ans(4))+"s
Repeat K=45 or Str1=Str2
Repeat Ans
If T
Then
timeCnv(checkTmr(T
Output(3,18,toString(Ans(3))+"m"+toString(Ans(4))+"s
End
getKey
End
Ans->K
If sum(Ans={22,31,32,33
Then
If K=22 or K=32
Then
Output(A-1,3,"
Output(A-1,9,"
A+(K=32)-(K=22->A
Ans+5(Ans=3)-5(Ans=9->A
Output(Ans-1,3,"*
Output(Ans-1,9,"*
Else
If K=31 or K=33
Then
Output(2,B,"
Output(8,B,"
B+(K=33)-(K=31->B
Ans+5(Ans=3)-5(Ans=9->B
Output(2,Ans,"*
Output(8,Ans,"*
End
End
Else
If K=24 or K=26
Then
If not(T
startTmr->T
sub(Str1,5A-15-3(K=24),1+3(K=24))+sub(Str1,5A-19,4-3(K=24
Output(A-1,4,Ans
If A>4
sub(Str1,1,5A-20)+Ans
If A<8
Ans+sub(Str1,5A-14,26-(5A-14
Ans->Str1
Else
If K=25 or K=34
Then
If not(T
startTmr->T
sub(Str1,B+2+15(K=34),1)+sub(Str1,B-2,4)+sub(Str1,B+7-10(K=34),1)+sub(Str1,B+3,4)+sub(Str1,B+12-10(K=34),1)+sub(Str1,B+8,4)+sub(Str1,B+17-10(K=34),1)+sub(Str1,B+13,4)+sub(Str1,B-3+15(K=34),1
If B>4
sub(Str1,1,B-4)+Ans
If B<8
Ans+sub(Str1,B+18,26-(B+18
Ans->Str1
For(I,0,4
Output(3+I,B,sub(Str1,5I+B-3,1
End
End
End
End
End
If Str1=Str2
Then
checkTmr(T
If Ans<sum(|LLOOP) or not(sum(|LLOOP
Then
{Ans->|LLOOP
timeCnv(sum(Ans
Output(8,18,toString(Ans(3))+"m"+toString(Ans(4))+"s
End
Output(5,16,"Congrats!
Repeat getKey
End
End
Archive |LLOOP
ClrHome