Kay, it's been a few hours, I've made the game...
I have a problem D:
Here is my code, currently, it kinda works, but playing with it a little, you will see that it actually has a very major bug that I haven't yet fixed. I've procrastinated the fixing of that bug by working on other things like the icon and adding the DoorsCSE detection code. I still need to add the main menu where I plan to add other maps, and possibly store them in a better way than just the plain matrix, although it's only like 49 elements, which isn't too bad.
EDIT: Added the main menu, a different level, and fixed the critical bug, its was a stupid mistake (I forgot to close a parenthesis when I had to)
Code: :DCS
"0000001111000000000011111111000000011111111110000011188888811100011188888888111001188889988881101118889999888111111889999998811111188999999881111118889999888111011888899888811001118888888811100011188888811100000111111111100000001111111100000000001111000000
If 80>det([[20
Then
Disp "G[|e][t] Doo[r][s] CSE [t]o [r]|u[n] [t]hi[s]:","h[t][t][p]://[|d][|c][s].[|c][|e]m[|e][t][|e][|c]h.[n][|e][t]
Return
End
real(0,1,1
real(8,1,0
real(0,3,4,149
"Pegs CSE
real(6,0,45,4,28
"Cross/Octagon/7x7/8x8/Quit
real(6,0,32,34,28,47
1->F
Repeat max(K={21,105,45
">
real(6,0,24,26+8F,8
Repeat K
getKey->K
End
">
If max(K={25,34
real(6,0,24,26+8F,149
F+(K=34)-(K=25->F
F-5(F=6)+5not(F->F
End
If K=45 or F=5
Return
If F=1
Then
[[2,2,0,0,0,2,2][2,2,0,0,0,2,2][0,0,0,0,0,0,0][0,0,0,1,0,0,0][0,0,0,0,0,0,0][2,2,0,0,0,2,2][2,2,0,0,0,2,2]]->[A]
32->E
End
If F=2
Then
[[2,2,0,0,0,2,2][2,0,0,0,0,0,2][0,0,0,0,0,0,0][0,0,0,0,0,0,0][0,0,0,0,0,0,0][2,0,0,0,0,0,2][2,2,0,0,1,2,2]]->[A]
36->E
End
If F=3
Then
DelVar [A]:{7,7->dim([A]
1->[A](1,1
48->E
End
If F=4
Then
DelVar [A]:{8,8->dim([A]
1->[A](1,1
63->E
End
real(8,1,0
real(0,3,4,223
"P[|e]g[s] CSE
real(6,0,45,4,21
For(A,1,7+(F=4
For(B,1,7+(F=4
[A](A,B)->C
If C=1 or not(C
Then
real(7,9,25+12A,10+12B,12,12,255
real(7,12,31+12A,16+12B,4,26+123C
End
End:End
DelVar K4->A:4->B
{0,0->L1
While E!=1
real(7,8,26+12A,11+12B,11,11
Repeat dim(L1)=6 or K=45
Repeat K
getKey->K
End
If K!=21
Then
real(7,8,26+12A,11+12B,11,11
Else
augment(L1,{A,B->L1
End
If K=24 and A>1
A-([A](A-1,B)!=2->A
If K=26 and A<(7+(F=4)
A+([A](A+1,B)!=2->A
If K=25 and B>1
B-([A](A,B-1)!=2->B
If K=34 and B<(7+(F=4
B+([A](A,B+1)!=2->B
real(7,8,26+12A,11+12B,11,11
End
If K=45
Return
If abs(L1(6)-L1(4))=2 xor abs(L1(5)-L1(3))=2
Then
A->C:B->D
If L1(6)!=L1(4)
Then
max(L1(6),L1(4)
Ans-1->D
Else
max(L1(5),L1(3)
Ans-1->C
End
If not([A](C,D)) and not([A](L1(3),L1(4))) and 1=[A](L1(5),L1(6
Then
E-1->E
real(7,12,31+12C,16+12D,4,149
1->[A](C,D
real(7,12,31+12L1(3),16+12L1(4),4,149
1->[A](L1(3),L1(4
real(7,12,31+12A,16+12B,4,26
0->[A](A,B
End
End
real(7,8,26+12L1(3),11+12L1(4),11,11
2->dim(L1
End
Pause