Code
:FullScreen
:0->Xmin
:94->Xmax
:0->Ymin
:62->Ymax
:ClrDraw
:CoordOff
:GridOff
:AxesOff
:Horizontal 0
:Horizontal 62
:Vertical 0
:Vertical 94
:For(A,1,07
:Text(10,A," SANGOHAN38"
:End
:For(A,1,10
:Text(A,53," PRESENTE:"
:End
:For(A,1,34
:Text(28,A," MORPION"
:End
:Text(52,27,"VERSION 2.0"
:Pause
:ClrDraw
:Lbl 1
:Menu("MORPION:","JOUER",2,"INSTRUCTIONS",3,"QUITTER",4
:Lbl 4
:ClrDraw
:ClrHome
:Output(1,1," "
:ClrList L1
:Stop
:Lbl 3
:ClrDraw
:Text(1,1,"POUR JOUER, ON UTILISE LES"
:Text(7,1,"TOUCHES [1] A [9]."
:Text(15,1,"APPUYES SUR LES TOUCHES ET
:Text(22,1,"APRES SUR [ENTER]."
:Line(52,30,52,0
:Line(22,30,22,00
:Line(52,30,22,30
:Line(52,20,22,20
:Line(52,10,22,10
:Line(52,00,22,00
:Line(42,30,42,0
:Line(32,30,32,0
:0->B
:Text(54,26,"1
:Text(54,36,"2
:Text(54,46,"3
:Text(44,26,"4
:Text(44,36,"5
:Text(44,46,"6
:Text(34,46,"9
:Text(34,36,"8
:Text(34,26,"7
:Lbl W
:If B[différent de]0:Goto X
:getKey->B
:If B=105:Goto 1
:If B=92:Text(54,26,"X
:If B=93:Text(54,36,"X
:If B=94:Text(54,46,"X
:If B=82:Text(44,26,"X
:If B=83:Text(44,36,"X
:If B=84:Text(44,46,"X
:If B=72:Text(34,26,"X
:If B=73:Text(34,36,"X
:If B=74:Text(34,46,"X
:1->[THETA]
:Goto W
:Lbl X
:[THETA]+1->[THETA]
:If [THETA][différent de]7:Goto X
:If B=92:Text(54,26,"1
:If B=93:Text(54,36,"2
:If B=94:Text(54,46,"3
:If B=82:Text(44,26,"4
:If B=83:Text(44,36,"5
:If B=84:Text(44,46,"6
:If B=72:Text(34,26,"7
:If B=73:Text(34,36,"8
:If B=74:Text(34,46,"9
:0->B
:Goto W
:Lbl 2
:ClrDraw
:1->A
:ClrList L1
:9->dim L1
:Line(32,10,32,40
:Line(42,10,42,40
:Line(52,10,52,40
:Line(62,10,62,40
:Line(32,10,62,10
:Line(32,20,62,20
:Line(32,30,62,30
:Line(32,40,62,40
:Text(1,31,"JOUEUR"
:Lbl 5
:1->A
:Text(1,57,A
:1->X
:getKey->B
:If B=92:Goto C
:If B=93:Goto D
:If B=94:Goto E
:If B=82:Goto 9
:If B=83:Goto A
:If B=84:Goto B
:If B=72:Goto 6
:If B=73:Goto 7
:If B=74:Goto 8
:Goto 5
:Lbl F
:2->A
:Text(1,57,A
:4->X
:getKey->B
:If B=92:Goto C
:If B=93:Goto D
:If B=94:Goto E
:If B=82:Goto 9
:If B=83:Goto A
:If B=84:Goto B
:If B=72:Goto 6
:If B=73:Goto 7
:If B=74:Goto 8
:Goto F
:Lbl 6
:24->S
:36->N
:7->O
:Lbl I
:If X=1 and L1(O)[différent de]0:Goto 5
:If X=4 and L1(O)[différent de]0:Goto F
:If L1(O)+X=1:L1(O)+X->L1(O)
:If L1(O)=1:Text(S,N,"X"
:If F=1 and L1(O)=1:Goto G
:If L1(O)+X=4:L1(O)+X->L1(O)
:If L1(O)=4:Text(S,N,"O"
:If F=1 and L1(O)=4:Goto H
:pxl-Test(S+1,N->F
:Goto I
:Lbl 7
:24->S
:46->N
:8->O
:Goto I
:Lbl 8
:24->S
:56->N
:9->O
:Goto I
:Lbl 9
:34->S
:36->N
:4->O
:Goto I
:Lbl A
:34->S
:46->N
:5->O
:Goto I
:Lbl B
:34->S
:56->N
:6->O
:Goto I
:Lbl C
:44->S
:36->N
:1->O
:Goto I
:Lbl D
:44->S
:46->N
:2->O
:Goto I
:Lbl E
:44->S
:56->N
:3->O
:Goto I
:Lbl M
:If L1(7)+L1(8)+L1(9)=3 or L1(7)+L1(8)+L1(9)=12
:Line(32,35,62,35
:If L1(4)+L1(5)+L1(6)=3 or L1(4)+L1(5)+L1(6)=12
:Line(32,25,62,25
:If L1(1)+L1(2)+L1(3)=3 or L1(1)+L1(2)+L1(3)=12
:Line(32,15,62,15
:If L1(7)+L1(4)+L1(1)=3 or L1(7)+L1(4)+L1(1)=12
:Line(37,40,37,10
:If L1(8)+L1(5)+L1(2)=3 or L1(8)+L1(5)+L1(2)=12
:Line(47,40,47,10
:If L1(9)+L1(6)+L1(3)=3 or L1(9)+L1(6)+L1(3)=12
:Line(57,40,57,10
:If L1(7)+L1(5)+L1(3)=3 or L1(7)+L1(5)+L1(3)=12
:Line(32,40,62,10
:If L1(9)+L1(5)+L1(1)=3 or L1(9)+L1(5)+L1(1)=12
:Line(62,40,32,10
:Text(7,33,"GAGNE"
:Pause
:Goto 1
:Lbl G
:If L1(1)+L1(2)+L1(3)=3 or L1(4)+L1(5)+L1(6)=3 or L1(7)+L1(8)+L1(9)=3 or L1(1)+L1(4)+L1(7)=3 or L1(2)+L1(5)+L1(8)=3 or L1(3)+L1(6)+L1(9)=3 or L1(1)+L1(5)+L1(9)=3 or L1(3)+L1(5)+L1(7)=3
:Goto M
:If L1(1)+L1(2)+L1(3)+L1(4)+L1(5)+L1(6)+L1(7)+L1(8)+L1(9)=21:Goto Y
:If L1(1)+L1(2)+L1(3)[différent de]3 and L1(4)+L1(5)+L1(6)[différent de]3 and L1(7)+L1(8)+L1(9)[différent de]3 and L1(1)+L1(4)+L1(7)[différent de]3 and L1(2)+L1(5)+L1(8)[différent de]3 and L1(3)+L1(6)+L1(9)[différent de]3 and L1(1)+L1(5)+L1(9)[différent de]3 and L1(3)+L1(5)+L1(7)[différent de]3
:Goto F
:Lbl Y
:Text(1,28," EGALITE "
:Pause
:Goto 1
:Lbl H
:If L1(1)+L1(2)+L1(3)=12 or L1(4)+L1(5)+L1(6)=12 or L1(7)+L1(8)+L1(9)=12 or L1(1)+L1(4)+L1(7)=12 or L1(2)+L1(5)+L1(8)=12 or L1(3)+L1(6)+L1(9)=12 or L1(1)+L1(5)+L1(9)=12 or L1(3)+L1(5)+L1(7)=12
:Goto M
:If L1(1)+L1(2)+L1(3)[différent de]12 and L1(4)+L1(5)+L1(6)[différent de]12 and L1(7)+L1(8)+L1(9)[différent de]12 and L1(1)+L1(4)+L1(7)[différent de]12 and L1(2)+L1(5)+L1(8)[différent de]12 and L1(3)+L1(6)+L1(9)[différent de]12 and L1(1)+L1(5)+L1(9)[différent de]12 and L1(3)+L1(5)+L1(7)[différent de]12
:Goto 5