'ProgramMode:RUN
ClrText
Blue "Louloux -48h CPC n_deg_2"
Red "Louloux -48h CPC n_deg_2"
Green "Louloux -48h CPC n_deg_2"
Yellow "Louloux -48h CPC n_deg_2"
Cyan "Louloux -48h CPC n_deg_2"
Magenta "Louloux -48h CPC n_deg_2"
Black "Louloux -48h CPC n_deg_2"
While Getkey<>31
WhileEnd
Menu "Lapin magicien","Nouveau",1,"Charger",2,"Cr_#E60A_dits",3
Lbl 1
1->N
{1,1->Dim Mat B
1->Mat B[1,1]
Lbl 2
Mat B[1,1]->N
Do
ClrText
0->I
0->J
If N=1
Then 1->J
2->X
6->Y
5->G
3->H
17->K
3->L
[[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,1][1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]->Mat A
Else If N=2
Then 1->I
2->X
6->Y
17->G
3->H
10->K
2->L
[[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1][1,0,0,0,0,0,2,1,1,1,1,1,2,0,0,0,0,0,0,0,1][1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]]->Mat A
Else If N=3
Then 1->J
2->X
6->Y
14->G
3->H
17->K
3->L
[[1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IfEnd
IfEnd
IfEnd
IfEnd
IfEnd
For 1->W To 7
For 1->V To 21
Mat A[W,V]=1=>Blue Locate V,W,"0"
Mat A[W,V]=2=>Red Locate V,W,"W"
Next
Next
Yellow Locate 20,6,"["
Do
Mat A[Y+1,X]=1=>4->S
Green Locate X,Y,"Y"
Magenta Locate G,H,"*"
Magenta Locate K,L,"*"
Mat A[Y,X]=2 Or (G=X And H=Y) Or (K=X And L=Y)=>Break
If Getkey=27 And Mat A[Y,X+1]=0
Then Locate X,Y," "
Isz X
Else If Getkey=38 And Mat A[Y,X-1]=0
Then Locate X,Y," "
Dsz X
Else If Getkey=48
Then Menu "PAUSE","Continuer",7,"Quitter",8
IfEnd
IfEnd
IfEnd
Lbl 7
If Getkey=28 And S>0 And Mat A[Y-1,X]=0
Then S-1->S
Locate X,Y," "
Y-1->Y
Else If Mat A[Y+1,X]<>1
Then Locate X,Y," "
Isz Y
IfEnd
IfEnd
Locate G,H," "
If I
Then If Mat A[H-1,G]
Then 0->I
Else Dsz H
IfEnd
Else If Mat A[H+1,G]
Then 1->I
Else Isz H
IfEnd
IfEnd
Locate K,L," "
If J
Then If Mat A[L-1,K]
Then 0->J
Else Dsz L
IfEnd
Else If Mat A[L+1,K]
Then 1->J
Else Isz L
IfEnd
IfEnd
LpWhile  Not (X=20 And Y=6) And Getkey<>47
If Getkey<>47
Then X=20 And Y=6=>Isz N
IfEnd
LpWhile Getkey<>47
Lbl 8
N->Mat B[1,1]
Lbl 3
ClrText
Blue "Jeu r_#E60A_alis_#E60A_ par LouisSUGY,         du sitePlan_#E609_te-Casio."
Red Locate 7,2,"Louloux"