46Fermer
darkovao31Le 25/05/2009 à 18:34
:Lbl A
:ClrHome
:1→X
:1→Y
:1→A
:1→B
:3→V
:
:Lbl 1
:Repeat K=105
:getKey→K
:Y+(K=34)-(K=25)→Y
:X+(K=26)-(K=24)→X
:If X=0:1→X
:If K=1:16→X
:If Y=0:1→Y
:If Y=7:6→Y
:Output(7,1,"----------------
:Output(8,2,"/3
:Output(8,1,V
:Output(B,A," 
:Output(Y,X,"0
:X→A
:Y→B
:If K=21
:Goto 2
:If V=0
:Then
:Output(8,7,"perdu!
:Pause 
:Goto A
:End
:End
:Goto 3
:
:Lbl 2
:Y→C
:X→D
:For(I,1,10
:getKey→K
:Output(C,D,"B
:X+(K=26)-(K=24)→X
:Y+(K=34)+(K=25)→Y
:If X=0:1→X
:If X=17:16→X
:If Y=0:1→Y
:If Y=7:6→Y
:Output(B,A," "
:X→A
:Y→B
:Output(Y,X,"0
:End
:
:For(I,1,10)
:Output(C,D-3,"---+---
:Output(C+2,D,"!
:Output(C+1,D,"!
:Output(C-1,D,"!
:Output(C-2,D,"!
:Output(8,7,"boum!
:End
:
:If Y=C and X=D or Y=C-1 and X=D
:V-1→V
:Output(C,D-3," "
:Output(C+2,D," "
:Output(C+1,D," "
:Output(C-1,D," "
:Output(C-2,D," "
:Output(8,7," "
:Goto 1
:Lbl 3
:ClrHome
:Output(1,1," "