Forum

Catégorie : Programmes
Forum : Les programmes des internautes
Vues : 3573
Réponses : 8
Type : discussion
Etat : réponses autorisées

Sudokid

Sangohan38 le 09/07/2006 à 12:53
Voici mon programme SUDOKID venant d'un jeu du même nom sur télé Z.

Le code c'est:

Code
:FullScreen
:Float
:ClrHome
:ClrList L
:{1,1}ü ( ) dim [A]
:{12,12}ü ( ) dim [A]
:0ü ( ) X
:4ü ( ) Z:4ü ( ) Á
:Lbl 1
:X+1ü ( ) X
:Output(2,7,"!"
:Output(3,7,"!"
:Output(4,5,"--+--"
:Output(5,7,"!"
:Output(6,7,"!"
:int rand4+1ü ( ) A
:If X=20:Stop
:If Aø[A](Z,Á+1) and Aø[A](Z,Á+2) and Aø[A](Z,Á+3) and Aø[A](Z+1,Á) and Aø[A](Z,Á) and Aø[A](Z+3,Á) and Aø[A](Z-1,Á) and Aø[A](Z-2,Á) and Aø[A](Z-3,Á) and Aø[A](Z,Á-1) and Aø[A](Z,Á-2) and Aø[A](Z,Á-3)
:Goto 2
:Goto 1
:Lbl 2
:If Z=4 and Á=4 or Z=6 and Á=4 or Z=6 and Á=6 or Z=4 and Á=6:Goto A
:If Z=4 and Á=5 or Z=4 and Á=7 or Z=6 and Á=5 or Z=6 and Á=7:Goto B
:If Z=5 and Á=4 or Z=5 and Á=6 or Z=7 and Á=6 or Z=7 and Á=4:Goto C
:If Z=5 and Á=5 or Z=5 and Á=7 or Z=7 and Á=7 or Z=7 and Á=5:Goto D
:Lbl A
:If Aø[A](Z+1,Á+1):Goto 4
:Lbl B
:If Aø[A](Z+1,Á-1):Goto 4
:Goto 1
:Lbl C
:If Aø[A](Z-1,Á+1):Goto 4
:Goto 1
:Lbl D
:If Aø[A](Z-1,Á-1)
:Goto 4
:Goto 1
:Lbl 4
:Aü ( ) [A](Z,Á)
:Á+1ü ( ) Á
:ú ( ) 1ü ( ) X
:If Á=8:Goto 5
:Goto 1
:Lbl 5
:If Z=7 and Á=8:Goto 6
:ú ( ) 1ü ( ) X
:4ü ( ) Á
:Z+1ü ( ) Z
:Goto 1
:Lbl 6
:0ü ( ) U
:16ü ( ) dim L
:Lbl 0
:While U÷ ( ) 5
:Aü ( ) C:Bü ( ) D:Cü ( ) E:Dü ( ) F:Eü ( ) G:Fü ( ) H:Gü ( ) I:Hü ( ) J
:Lbl 7
:int rand4+4ü ( ) A
:int rand4+4ü ( ) B
:If A=C and B=D:Goto 7
:If A=E and B=F:Goto 7
:If A=G and B=H
:Goto 7
:If A=I and J=A:Goto 7
:If A=4:B-3ü ( ) Z
:If A=5:A+B-4ü ( ) Z
:If A=6:A+B-1ü ( ) Z
:If A=7:A+B+2ü ( ) Z
:[A](A,B)ü ( ) L(Z)
:U+1ü ( ) U
:Goto 0
:End
:Output(2,5,L(1)
:If L(1)=0:Output(2,5," "
:Output(2,6,L(2)
:If L(2)=0:Output(2,6," "
:Output(2,8,L(3)
:If L(3)=0:Output(2,8," "
:Output(2,9,L(4)
:If L(4)=0:Output(2,9," "
:Output(3,5,L(5)
:If L(5)=0:Output(3,5," "
:Output(3,6,L(6)
:If L(6)=0:Output(3,6," "
:Output(3,8,L(7)
:If L(7)=0:Output(3,8," "
:Output(3,9,L(8)
:If L(8)=0:Output(3,9," "
:Output(5,5,L(9)
:If L(9)=0:Output(5,5," "
:Output(5,6,L(10)
:If L(10)=0:Output(5,6," "
:Output(5,8,L(11)
:If L(11)=0:Output(5,8," "
:Output(5,9,L(12)
:If L(12)=0:Output(5,9," "
:Output(6,5,L(13)
:If L(13)=0:Output(6,5," "
:Output(6,6,L(14)
:If L(14)=0:Output(6,6," "
:Output(6,8,L(15)
:If L(15)=0:Output(6,8," "
:Output(6,9,L(16)
:If L(16)=0:Output(6,9," "
:Stop
ratuss le 09/07/2006 à 14:09
j'adore le nom kiss.gif

PS : un lien qui marche ce serait mieux crazy.gif , @+
Sangohan38 le 09/07/2006 à 14:52
Tu voit le lien que je met pour télécharger mon morpion, mafia ...?
Et ben c'est le même.
ratuss le 09/07/2006 à 15:12
Hein, dsl j 'ai pas compris minied.gif
Jcotnys le 09/07/2006 à 16:49
cool un sudokid ! minied.gif le rond barré c "différent de"???? ahh.gif ahh.gif
ratuss le 09/07/2006 à 18:13
D'ailleurs Sango logiquement t'as pas besoin du stop a la fin winkle.gif .
Sangohan38 le 10/07/2006 à 07:13
Oups. Pour le Stop, c'est l'habitude.
Pour les correondance rond barrés ... prend le ti graph link et copie dessus.
ratuss le 10/07/2006 à 10:09
Stop = 2 octet (1 pour le saut de ligne et 1 pour le symbole) extraterre.gif
Sangohan38 le 10/07/2006 à 10:20
2 octets!!! MAIS C'EST ENORME!!!!!!!!! laugh.gif laugh.gif laugh.gif