Batch Index du Forum
S’enregistrerRechercherFAQMembresGroupesConnexion
Répondre au sujet Page 1 sur 1
[MAJ]Kogyo
Auteur Message
Répondre en citant
Message [MAJ]Kogyo 
Salut à tous !
En ce moment, je me suis mis à faire pas mal de jeux en Batch.
En voici un qui m'as pris beaucoup de temps:

Nom: Kogyo
Type: Stratégie/Réfléxion/Mémoire
Testé sous: Windows 7 Starter

Kogyo est une variante du Démineur.

Code source:


Code:
@Echo Off
Title Kogyo
Color 0F
Mode 28,14

:Menu

Mode 31,15
Echo.
Echo  Û  Û  ÛÛÛ   ÛÛÛ Û   Û  ÛÛÛ
Echo  Û Û  Û   Û Û     Û Û  Û   Û
Echo  ÛÛ   Û   Û Û ÛÛÛ  Û   Û   Û
Echo  Û Û  Û   Û Û   Û  Û   Û   Û
Echo  Û  Û  ÛÛÛ   ÛÛÛ   Û    ÛÛÛ
Echo.
Echo  1) Jouer
Echo  2) Aide
Echo  3) Quitter
Echo.
Set /P "Choice=Choix: "
If "%Choice%" EQU "1" Goto Beggining
If "%Choice%" EQU "2" Goto Help
If "%Choice%" EQU "3" Exit

:Beggining

SetLocal EnableDelayedExpansion
Set "Stroke=[ ]"
Set "State=[N]"
Set "Try=0"
Set "Around=0"
Set "Score=0"
Set "A= A "
Set "B= B "
Set "C= C "
Set "D= D "
Set "E= E "
Set "F= F "
Set "G= G "
Set "H= H "
Set "I= I "
Set "J= J "
Set "K= K "
Set "L= L "
Set "M= M "
Set "N= N "
Set "O= O "
Set "P= P "

:KogyoA
Ping LocalHost -n 2 > Nul
Cls
Set /A "KogyoA=%Random%%%17"
Echo Chargement...
If "%KogyoA%" EQU "0" Goto KogyoA
If "%KogyoA%" EQU "1" Goto KogyoB
If "%KogyoA%" EQU "2" Goto KogyoB
If "%KogyoA%" EQU "3" Goto KogyoB
If "%KogyoA%" EQU "4" Goto KogyoB
If "%KogyoA%" EQU "5" Goto KogyoB
If "%KogyoA%" EQU "6" Goto KogyoB
If "%KogyoA%" EQU "7" Goto KogyoB
If "%KogyoA%" EQU "8" Goto KogyoB
If "%KogyoA%" EQU "9" Goto KogyoB
If "%KogyoD%" EQU "10" Goto KogyoB
If "%KogyoD%" EQU "11" Goto KogyoB
If "%KogyoD%" EQU "12" Goto KogyoB
If "%KogyoD%" EQU "13" Goto KogyoB
If "%KogyoD%" EQU "14" Goto KogyoB
If "%KogyoD%" EQU "15" Goto KogyoB
If "%KogyoD%" EQU "16" Goto KogyoB

:KogyoB
Ping LocalHost -n 2 > Nul
Cls
Set /A "KogyoB=%Random%%%17"
Echo Chargement...
If "%KogyoB%" EQU "0" Goto KogyoB
If "%KogyoB%" EQU "%KogyoA%" Goto KogyoB
If "%KogyoB%" EQU "1" Goto KogyoC
If "%KogyoB%" EQU "2" Goto KogyoC
If "%KogyoB%" EQU "3" Goto KogyoC
If "%KogyoB%" EQU "4" Goto KogyoC
If "%KogyoB%" EQU "5" Goto KogyoC
If "%KogyoB%" EQU "6" Goto KogyoC
If "%KogyoB%" EQU "7" Goto KogyoC
If "%KogyoB%" EQU "8" Goto KogyoC
If "%KogyoB%" EQU "9" Goto KogyoC
If "%KogyoD%" EQU "10" Goto KogyoC
If "%KogyoD%" EQU "11" Goto KogyoC
If "%KogyoD%" EQU "12" Goto KogyoC
If "%KogyoD%" EQU "13" Goto KogyoC
If "%KogyoD%" EQU "14" Goto KogyoC
If "%KogyoD%" EQU "15" Goto KogyoC
If "%KogyoD%" EQU "16" Goto KogyoC

:KogyoC
Ping LocalHost -n 2 > Nul
Cls
Set /A "KogyoC=%Random%%%17"
Echo Chargement...
If "%KogyoC%" EQU "0" Goto KogyoC
If "%KogyoC%" EQU "%KogyoA%" Goto KogyoC
If "%KogyoC%" EQU "%KogyoB%" Goto KogyoC
If "%KogyoC%" EQU "1" Goto KogyoD
If "%KogyoC%" EQU "2" Goto KogyoD
If "%KogyoC%" EQU "3" Goto KogyoD
If "%KogyoC%" EQU "4" Goto KogyoD
If "%KogyoC%" EQU "5" Goto KogyoD
If "%KogyoC%" EQU "6" Goto KogyoD
If "%KogyoC%" EQU "7" Goto KogyoD
If "%KogyoC%" EQU "8" Goto KogyoD
If "%KogyoC%" EQU "9" Goto KogyoD
If "%KogyoD%" EQU "10" Goto KogyoD
If "%KogyoD%" EQU "11" Goto KogyoD
If "%KogyoD%" EQU "12" Goto KogyoD
If "%KogyoD%" EQU "13" Goto KogyoD
If "%KogyoD%" EQU "14" Goto KogyoD
If "%KogyoD%" EQU "15" Goto KogyoD
If "%KogyoD%" EQU "16" Goto KogyoD

:KogyoD
Ping LocalHost -n 2 > Nul
Cls
Set /A "KogyoD=%Random%%%17"
Echo Chargement...
If "%KogyoD%" EQU "0" Goto KogyoD
If "%KogyoD%" EQU "%KogyoA%" Goto KogyoD
If "%KogyoD%" EQU "%KogyoB%" Goto KogyoD
If "%KogyoD%" EQU "%KogyoC%" Goto KogyoD
If "%KogyoD%" EQU "1" Goto Letter
If "%KogyoD%" EQU "2" Goto Letter
If "%KogyoD%" EQU "3" Goto Letter
If "%KogyoD%" EQU "4" Goto Letter
If "%KogyoD%" EQU "5" Goto Letter
If "%KogyoD%" EQU "6" Goto Letter
If "%KogyoD%" EQU "7" Goto Letter
If "%KogyoD%" EQU "8" Goto Letter
If "%KogyoD%" EQU "9" Goto Letter
If "%KogyoD%" EQU "10" Goto Letter
If "%KogyoD%" EQU "11" Goto Letter
If "%KogyoD%" EQU "12" Goto Letter
If "%KogyoD%" EQU "13" Goto Letter
If "%KogyoD%" EQU "14" Goto Letter
If "%KogyoD%" EQU "15" Goto Letter
If "%KogyoD%" EQU "16" Goto Letter

:Letter
If "%KogyoA%" EQU "1" Set "KogyoA=A"
If "%KogyoA%" EQU "2" Set "KogyoA=B"
If "%KogyoA%" EQU "3" Set "KogyoA=C"
If "%KogyoA%" EQU "4" Set "KogyoA=D"
If "%KogyoA%" EQU "5" Set "KogyoA=E"
If "%KogyoA%" EQU "6" Set "KogyoA=F"
If "%KogyoA%" EQU "7" Set "KogyoA=G"
If "%KogyoA%" EQU "8" Set "KogyoA=H"
If "%KogyoA%" EQU "9" Set "KogyoA=I"
If "%KogyoA%" EQU "10" Set "KogyoA=J"
If "%KogyoA%" EQU "11" Set "KogyoA=K"
If "%KogyoA%" EQU "12" Set "KogyoA=L"
If "%KogyoA%" EQU "13" Set "KogyoA=M"
If "%KogyoA%" EQU "14" Set "KogyoA=N"
If "%KogyoA%" EQU "15" Set "KogyoA=O"
If "%KogyoA%" EQU "16" Set "KogyoA=P"
If "%KogyoB%" EQU "1" Set "KogyoB=A"
If "%KogyoB%" EQU "2" Set "KogyoB=B"
If "%KogyoB%" EQU "3" Set "KogyoB=C"
If "%KogyoB%" EQU "4" Set "KogyoB=D"
If "%KogyoB%" EQU "5" Set "KogyoB=E"
If "%KogyoB%" EQU "6" Set "KogyoB=F"
If "%KogyoB%" EQU "7" Set "KogyoB=G"
If "%KogyoB%" EQU "8" Set "KogyoB=H"
If "%KogyoB%" EQU "9" Set "KogyoB=I"
If "%KogyoB%" EQU "10" Set "KogyoB=J"
If "%KogyoB%" EQU "11" Set "KogyoB=K"
If "%KogyoB%" EQU "12" Set "KogyoB=L"
If "%KogyoB%" EQU "13" Set "KogyoB=M"
If "%KogyoB%" EQU "14" Set "KogyoB=N"
If "%KogyoB%" EQU "15" Set "KogyoB=O"
If "%KogyoB%" EQU "16" Set "KogyoB=P"
If "%KogyoC%" EQU "1" Set "KogyoC=A"
If "%KogyoC%" EQU "2" Set "KogyoC=B"
If "%KogyoC%" EQU "3" Set "KogyoC=C"
If "%KogyoC%" EQU "4" Set "KogyoC=D"
If "%KogyoC%" EQU "5" Set "KogyoC=E"
If "%KogyoC%" EQU "6" Set "KogyoC=F"
If "%KogyoC%" EQU "7" Set "KogyoC=G"
If "%KogyoC%" EQU "8" Set "KogyoC=H"
If "%KogyoC%" EQU "9" Set "KogyoC=I"
If "%KogyoC%" EQU "10" Set "KogyoC=J"
If "%KogyoC%" EQU "11" Set "KogyoC=K"
If "%KogyoC%" EQU "12" Set "KogyoC=L"
If "%KogyoC%" EQU "13" Set "KogyoC=M"
If "%KogyoC%" EQU "14" Set "KogyoC=N"
If "%KogyoC%" EQU "15" Set "KogyoC=O"
If "%KogyoC%" EQU "16" Set "KogyoC=P"
If "%KogyoD%" EQU "1" Set "KogyoD=A"
If "%KogyoD%" EQU "2" Set "KogyoD=B"
If "%KogyoD%" EQU "3" Set "KogyoD=C"
If "%KogyoD%" EQU "4" Set "KogyoD=D"
If "%KogyoD%" EQU "5" Set "KogyoD=E"
If "%KogyoD%" EQU "6" Set "KogyoD=F"
If "%KogyoD%" EQU "7" Set "KogyoD=G"
If "%KogyoD%" EQU "8" Set "KogyoD=H"
If "%KogyoD%" EQU "9" Set "KogyoD=I"
If "%KogyoD%" EQU "10" Set "KogyoD=J"
If "%KogyoD%" EQU "11" Set "KogyoD=K"
If "%KogyoD%" EQU "12" Set "KogyoD=L"
If "%KogyoD%" EQU "13" Set "KogyoD=M"
If "%KogyoD%" EQU "14" Set "KogyoD=N"
If "%KogyoD%" EQU "15" Set "KogyoD=O"
If "%KogyoD%" EQU "16" Set "KogyoD=P"

:Grid
Set L1=³!A!!B!!C!!D!³
Set L2=³!E!!F!!G!!H!³
Set L3=³!I!!J!!K!!L!³
Set L4=³!M!!N!!O!!P!³
Cls
Echo.
Echo    ~ Kogyo ~
Echo.
Echo  ÚÄÄÄÄÄÄÄÄÄÄÄÄ¿
Echo  %L1% Precedent: %Stroke%
Echo  ³            ³ Indice: %State%
Echo  %L2% Nombre: [%Around%]
Echo  ³            ³ Score: [%Score%]
Echo  %L3%
Echo  ³            ³
Echo  %L4%
Echo  ÀÄÄÄÄÄÄÄÄÄÄÄÄÙ
Echo.
If "%Try%" EQU "12" Goto Win
Set /P "Square=Case: "
Set "Stroke=[%Square%]"
Set "State=[N]"
Set "Around=0"
If /I "%Square%" EQU "A" Goto Square_A
If /I "%Square%" EQU "B" Goto Square_B
If /I "%Square%" EQU "C" Goto Square_C
If /I "%Square%" EQU "D" Goto Square_D
If /I "%Square%" EQU "E" Goto Square_E
If /I "%Square%" EQU "F" Goto Square_F
If /I "%Square%" EQU "G" Goto Square_G
If /I "%Square%" EQU "H" Goto Square_H
If /I "%Square%" EQU "I" Goto Square_I
If /I "%Square%" EQU "J" Goto Square_J
If /I "%Square%" EQU "K" Goto Square_K
If /I "%Square%" EQU "L" Goto Square_L
If /I "%Square%" EQU "M" Goto Square_M
If /I "%Square%" EQU "N" Goto Square_N
If /I "%Square%" EQU "O" Goto Square_O
If /I "%Square%" EQU "P" Goto Square_P

:Square_A
If "%KogyoA%" EQU "A" Goto Lose
If "%KogyoB%" EQU "A" Goto Lose
If "%KogyoC%" EQU "A" Goto Lose
If "%KogyoD%" EQU "A" Goto Lose
If "%A%" EQU " A " (
Set "A= / "
Set /A "Try+=1"
Set /A "Score+=1"
If "%KogyoA%" EQU "B" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "B" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "B" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "B" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "E" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "E" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "E" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "E" Set "State=[Y]" &Set /A "Around+=1"
Goto Grid
)
If "%A%" EQU " / " Goto Grid

:Square_B
If "%KogyoA%" EQU "B" Goto Lose
If "%KogyoB%" EQU "B" Goto Lose
If "%KogyoC%" EQU "B" Goto Lose
If "%KogyoD%" EQU "B" Goto Lose
If "%B%" EQU " B " (
Set "B= / "
Set /A "Try+=1"
Set /A "Score+=1"
If "%KogyoA%" EQU "A" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "A" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "A" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "A" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "F" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "F" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "F" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "F" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "C" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "C" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "C" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "C" Set "State=[Y]" &Set /A "Around+=1"
Goto Grid
)
If "%B%" EQU " / " Goto Grid

:Square_C
If "%KogyoA%" EQU "C" Goto Lose
If "%KogyoB%" EQU "C" Goto Lose
If "%KogyoC%" EQU "C" Goto Lose
If "%KogyoD%" EQU "C" Goto Lose
If "%C%" EQU " C " (
Set "C= / "
Set /A "Try+=1"
Set /A "Score+=1"
If "%KogyoA%" EQU "B" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "B" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "B" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "B" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "G" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "G" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "G" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "G" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "D" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "D" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "D" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "D" Set "State=[Y]" &Set /A "Around+=1"
Goto Grid
)
If "%C%" EQU " / " Goto Grid

:Square_D
If "%KogyoA%" EQU "D" Goto Lose
If "%KogyoB%" EQU "D" Goto Lose
If "%KogyoC%" EQU "D" Goto Lose
If "%KogyoD%" EQU "D" Goto Lose
If "%D%" EQU " D " (
Set "D= / "
Set /A "Try+=1"
Set /A "Score+=1"
If "%KogyoA%" EQU "C" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "C" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "C" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "C" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "H" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "H" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "H" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "H" Set "State=[Y]" &Set /A "Around+=1"
Goto Grid
)
If "%D%" EQU " / " Goto Grid

:Square_E
If "%KogyoA%" EQU "E" Goto Lose
If "%KogyoB%" EQU "E" Goto Lose
If "%KogyoC%" EQU "E" Goto Lose
If "%KogyoD%" EQU "E" Goto Lose
If "%E%" EQU " E " (
Set "E= / "
Set /A "Try+=1"
Set /A "Score+=1"
If "%KogyoA%" EQU "A" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "A" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "A" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "A" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "F" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "F" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "F" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "F" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "I" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "I" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "I" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "I" Set "State=[Y]" &Set /A "Around+=1"
Goto Grid
)
If "%E%" EQU " / " Goto Grid

:Square_F
If "%KogyoA%" EQU "F" Goto Lose
If "%KogyoB%" EQU "F" Goto Lose
If "%KogyoC%" EQU "F" Goto Lose
If "%KogyoD%" EQU "F" Goto Lose
If "%F%" EQU " F " (
Set "F= / "
Set /A "Try+=1"
Set /A "Score+=1"
If "%KogyoA%" EQU "B" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "B" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "B" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "B" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "E" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "E" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "E" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "E" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "G" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "G" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "G" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "G" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "J" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "J" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "J" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "J" Set "State=[Y]" &Set /A "Around+=1"
Goto Grid
)
If "%F%" EQU " / " Goto Grid

:Square_G
If "%KogyoA%" EQU "G" Goto Lose
If "%KogyoB%" EQU "G" Goto Lose
If "%KogyoC%" EQU "G" Goto Lose
If "%KogyoD%" EQU "G" Goto Lose
If "%G%" EQU " G " (
Set "G= / "
Set /A "Try+=1"
Set /A "Score+=1"
If "%KogyoA%" EQU "C" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "C" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "C" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "C" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "F" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "F" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "F" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "F" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "H" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "H" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "H" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "H" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "K" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "K" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "K" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "K" Set "State=[Y]" &Set /A "Around+=1"
Goto Grid
)
If "%G%" EQU " / " Goto Grid

:Square_H
If "%KogyoA%" EQU "H" Goto Lose
If "%KogyoB%" EQU "H" Goto Lose
If "%KogyoC%" EQU "H" Goto Lose
If "%KogyoD%" EQU "H" Goto Lose
If "%H%" EQU " H " (
Set "H= / "
Set /A "Try+=1"
Set /A "Score+=1"
If "%KogyoA%" EQU "D" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "D" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "D" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "D" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "G" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "G" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "G" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "G" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "L" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "L" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "L" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "L" Set "State=[Y]" &Set /A "Around+=1"
Goto Grid
)
If "%H%" EQU " / " Goto Grid

:Square_I
If "%KogyoA%" EQU "I" Goto Lose
If "%KogyoB%" EQU "I" Goto Lose
If "%KogyoC%" EQU "I" Goto Lose
If "%KogyoD%" EQU "I" Goto Lose
If "%I%" EQU " I " (
Set "I= / "
Set /A "Try+=1"
Set /A "Score+=1"
If "%KogyoA%" EQU "E" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "E" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "E" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "E" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "J" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "J" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "J" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "J" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "M" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "M" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "M" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "M" Set "State=[Y]" &Set /A "Around+=1"
Goto Grid
)
If "%I%" EQU " / " Goto Grid

:Square_J
If "%KogyoA%" EQU "J" Goto Lose
If "%KogyoB%" EQU "J" Goto Lose
If "%KogyoC%" EQU "J" Goto Lose
If "%KogyoD%" EQU "J" Goto Lose
If "%J%" EQU " J " (
Set "J= / "
Set /A "Try+=1"
Set /A "Score+=1"
If "%KogyoA%" EQU "F" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "F" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "F" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "F" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "I" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "I" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "I" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "I" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "K" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "K" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "K" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "K" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "N" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "N" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "N" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "N" Set "State=[Y]" &Set /A "Around+=1"
Goto Grid
)
If "%J%" EQU " / " Goto Grid

:Square_K
If "%KogyoA%" EQU "K" Goto Lose
If "%KogyoB%" EQU "K" Goto Lose
If "%KogyoC%" EQU "K" Goto Lose
If "%KogyoD%" EQU "K" Goto Lose
If "%K%" EQU " K " (
Set "K= / "
Set /A "Try+=1"
Set /A "Score+=1"
If "%KogyoA%" EQU "G" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "G" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "G" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "G" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "J" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "J" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "J" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "J" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "L" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "L" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "L" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "L" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "O" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "O" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "O" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "O" Set "State=[Y]" &Set /A "Around+=1"
Goto Grid
)
If "%K%" EQU " / " Goto Grid

:Square_L
If "%KogyoA%" EQU "L" Goto Lose
If "%KogyoB%" EQU "L" Goto Lose
If "%KogyoC%" EQU "L" Goto Lose
If "%KogyoD%" EQU "L" Goto Lose
If "%L%" EQU " L " (
Set "L= / "
Set /A "Try+=1"
Set /A "Score+=1"
If "%KogyoA%" EQU "H" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "H" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "H" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "H" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "K" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "K" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "K" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "K" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "P" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "P" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "P" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "P" Set "State=[Y]" &Set /A "Around+=1"
Goto Grid
)
If "%L%" EQU " / " Goto Grid

:Square_M
If "%KogyoA%" EQU "M" Goto Lose
If "%KogyoB%" EQU "M" Goto Lose
If "%KogyoC%" EQU "M" Goto Lose
If "%KogyoD%" EQU "M" Goto Lose
If "%M%" EQU " M " (
Set "M= / "
Set /A "Try+=1"
Set /A "Score+=1"
If "%KogyoA%" EQU "I" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "I" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "I" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "I" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "N" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "N" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "N" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "N" Set "State=[Y]" &Set /A "Around+=1"
Goto Grid
)
If "%M%" EQU " / " Goto Grid

:Square_N
If "%KogyoA%" EQU "N" Goto Lose
If "%KogyoB%" EQU "N" Goto Lose
If "%KogyoC%" EQU "N" Goto Lose
If "%KogyoD%" EQU "N" Goto Lose
If "%N%" EQU " N " (
Set "N= / "
Set /A "Try+=1"
Set /A "Score+=1"
If "%KogyoA%" EQU "J" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "J" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "J" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "J" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "M" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "M" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "M" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "M" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "O" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "O" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "O" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "O" Set "State=[Y]" &Set /A "Around+=1"
Goto Grid
)
If "%N%" EQU " / " Goto Grid

:Square_O
If "%KogyoA%" EQU "O" Goto Lose
If "%KogyoB%" EQU "O" Goto Lose
If "%KogyoC%" EQU "O" Goto Lose
If "%KogyoD%" EQU "O" Goto Lose
If "%O%" EQU " O " (
Set "O= / "
Set /A "Try+=1"
Set /A "Score+=1"
If "%KogyoA%" EQU "K" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "K" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "K" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "K" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "N" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "N" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "N" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "N" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "P" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "P" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "P" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "P" Set "State=[Y]" &Set /A "Around+=1"
Goto Grid
)
If "%O%" EQU " / " Goto Grid

:Square_P
If "%KogyoA%" EQU "P" Goto Lose
If "%KogyoB%" EQU "P" Goto Lose
If "%KogyoC%" EQU "P" Goto Lose
If "%KogyoD%" EQU "P" Goto Lose
If "%P%" EQU " P " (
Set "P= / "
Set /A "Try+=1"
Set /A "Score+=1"
If "%KogyoA%" EQU "L" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "L" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "L" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "L" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoA%" EQU "O" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoB%" EQU "O" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoC%" EQU "O" Set "State=[Y]" &Set /A "Around+=1"
If "%KogyoD%" EQU "O" Set "State=[Y]" &Set /A "Around+=1"
Goto Grid
)
If "%P%" EQU " / " Goto Grid

:Help

Mode 72,16
Cls
Echo                              ~ Regle ~
Echo.
Echo  Vous avez une grille de 4x4 (16 cases).
Echo  4 cases sont piegees (mines).
Echo  Vous devez jouer les 12 cases non-piegees sans jouer une case piegee.
Echo  Seul l'indice vous permet de savoir si une mine
Echo  est autour de la case que vous avez jouez precedement:
Echo  "Y" si il y a une mine autour et "N" si il n'y en a pas.
Echo.
Echo  Precedent: Indique la case jouée precedement.
Echo  Indice: Indique si il y une mines [Y] ou pas [N]
Echo  Nombre: Indique le nombre de mines autour de la case jouee.
Echo.
Echo                            Bonne Chance !
Pause>Nul
Goto Menu

:Win

Echo  Votre Score: %Score% > Score.txt
Ping LocalHost -n 4 > Nul
EndLocal
Cls
Echo  Gagne !
Type Score.txt
Ping LocalHost -n 4 > Nul
Del Score.txt
Set /P Choice=Rejouer [O/N]:
If /I "%Choice%" EQU "O" Goto Beggining
If /I "%Choice%" EQU "N" Exit

:Lose   

Echo  Votre Score: %Score% > Score.txt
Ping LocalHost -n 4 > Nul
EndLocal
Cls
Echo  Perdu !
Type Score.txt
Ping LocalHost -n 4 > Nul
Del Score.txt
Set /P Choice=Rejouer [O/N]:
If /I "%Choice%" EQU "O" Goto Beggining
If /I "%Choice%" EQU "N" Exit



Voila, dites moi ce que vous en pensez !

Dylan.



Dernière édition par XtR3m_St4RkY le Sam 3 Aoû 2013 - 00:24; édité 8 fois

______________________________________________________
Viens découvrir INTERPOL, un nouveau langage interprété !

Yahoo Messenger
Message Publicité 
PublicitéSupprimer les publicités ?


Répondre en citant
Message [MAJ]Kogyo 
Hello Twisted Evil
Tu m'a volé la vedette avec mon nouveaux démineur Evil or Very Mad
Sinon,J'ai rien compris à ton jeu Laughing Et puis pourquoi tout est en anglais ??
Comment veux-tu qu'on puisse se souvenir des states d’autant de cases (= 11 )




______________________________________________________
Clickez sur Saturne pour voir mes tutoriels et sur la Terre pour voir mon Forum:


Skype
Répondre en citant
Message [MAJ]Kogyo 
Bah j'ai coder en Anglais pour le style (Excuse bidon je sais Mr. Green )
Et pour retenir les états, notes sur une feuille Twisted Evil
Okay




______________________________________________________
Viens découvrir INTERPOL, un nouveau langage interprété !

Yahoo Messenger
Répondre en citant
Message [MAJ]Kogyo 
Bonjour
pas testé mais pour la langue tu pourrais detecter la langue du pc et afficher le menu en anglais ou français
c est vrai que coder à l interieur en anglais je peux comprendre mais le menu bof...

edit en jouant ben en anglais bof je sais pas quoi faire en fait et l aide en anglais c est balo. bref je passe mon chemin

une fois perdu il relance tout seul une partie




______________________________________________________
Faites paraitre votre batch sur BatchClipboard
Visiter le site web du posteur
Répondre en citant
Message [MAJ]Kogyo 
Bon bah OK, je vais faire une MAJ en Français ^^




______________________________________________________
Viens découvrir INTERPOL, un nouveau langage interprété !

Yahoo Messenger
Répondre en citant
Message [MAJ]Kogyo 
LG est jaloux ? Laughing

Sinon, pour ton jeu, pourquoi pas faire appelle à un lang.txt qui réunis toutes les phrases du jeu et comme tu vas voir quelle langue est l'ordinateur, je te suggère de faire langFR.txt, langEN.txt

Sur ce,
@+




______________________________________________________
Skype
Message [MAJ]Kogyo 


Montrer les messages depuis:
Répondre au sujet Page 1 sur 1
  



Index | créer un forum | Forum gratuit d’entraide | Annuaire des forums gratuits | Signaler une violation | Conditions générales d'utilisation
Copyright 2008 - 2016 // Batch