Batch Index du Forum
S’enregistrerRechercherFAQMembresGroupesConnexion
Répondre au sujet Page 1 sur 1
PAC_MAN
Auteur Message
Répondre en citant
Message PAC_MAN 
Hello !

Voici un moment déjà, j'avais lancé un projet collaboratif pour un jeu !
Le code est bien avancé maintenant, il mérite sa place dans cette section, pour faire valoir le travail de chaque participant Okay

Voici donc, en exclusivité, nul part ailleurs, un Jeu de PAC_MAN intégralement en batch (+commande externe incluse au batch) !

Enjoy Wink

Code:

@echo off
title )}--PAC_MAN--{(   ^| Batch ^|
:: Code participatif des membres de http://batch.xoo.it
color 0E
SETLOCAL ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
if not exist key.exe echo installation de key.exe...&call:dep_key.exe
:: ###############################################
:: #
:: #
:: ################  RESET GAME  ################
:RESET
:: \\ %CVR% correspond a chaque "brique" du mur
set CVR=Û
:: \\ %PAC% est le personnage Pac-Man
set PAC=
:: \\ %GUM% est le personnage Pac-Gomme
set GUM=.
:: \\ %GHOST% est le personnage Fantome
set GHOST=
:: \\ %LIFE% est le personnage VIE
set LIFE=
:: \\ %NB_LIFE% est le nombre de Vies
set NB_LIFE=3
:: \\ %LVL_MAX% correspond aux niveaux construits
set LVL_MAX=4
:: ###############################################
:: #
:: #
:: ##################################----MENU----################################
:MENU
cls
echo. &echo.
echo            ____       _       ____           __  __      _      _   _
echo           ^|  _ \     / \     / ___^|         ^|  \/  ^|    / \    ^| \ ^| ^|
echo           ^| ^|_) ^|   / _ \   ^| ^|             ^| ^|\/^| ^|   / _ \   ^|  \^| ^|
echo           ^|  __/   / ___ \  ^| ^|___   BATCH  ^| ^|  ^| ^|  / ___ \  ^| ^|\  ^|
echo           ^|_^|     /_/   \_\  \____^|         ^|_^|  ^|_^| /_/   \_\ ^|_^| \_^|
echo. &echo. &echo.
echo                          ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo                          º                            º
echo                          º     -- RŠgle du Jeu --     º
echo                          º                            º
echo                          º    Utilisez les flŠches    º
echo                          º    pour diriger Pac-Man    º
echo                          º                            º
echo                          º     Espace pour sortir     º
echo                          º                            º
echo                          ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo. &echo.
set SCORE=0
set LVL=1
set /p LVL=                         Choix du Niveau [ 1 - %LVL_MAX% ]  \\:
for /f "delims=1234" %%A in ("%LVL%") do (
    goto :MENU
   )
set LVL=:LEVEL_%LVL%
goto %LVL%
:: ############################################################################
:: #
:: #
:: ################  Initialisation du LEVEL_1 ################
:LEVEL_1

:: \\ Reset déplacement du Pac-Man
set TOUCH=UNDEFINED

:: \\ Initialisation des PAC-GOMMES Tous Niveaux
for /l %%A in (1,1,17) do (
    for /l %%B in (1,1,39) do (
       set "X%%A_Y%%B=%GUM%"
      set "TRANS_X%%A_Y%%B=%GUM%"
      )
   )

:: \\ Emplacement du PAC-MAN ------
set EX_POS_PAC=X9_Y20
set %EX_POS_PAC%=%PAC%

:: \\ Emplacement des Fantomes
set EX_POS_G1=X2_Y2
set %EX_POS_G1%=%GHOST%
set "OP_G1=+"

set EX_POS_G2=X2_Y38
set %EX_POS_G2%=%GHOST%
set "OP_G2=+"

set EX_POS_G3=X16_Y2
set %EX_POS_G3%=%GHOST%
set "OP_G3=+"

set EX_POS_G4=X16_Y38
set %EX_POS_G4%=%GHOST%
set "OP_G4=+"

:: \\ Emplacement des Vies ------
set X16_Y11=%LIFE%
set TRANS_X16_Y11=%LIFE%

:: \\ Nombres de PAC-GOMMES
set NB_GUM=0
set MAX_GUM=245

:: \\ Murs du Contour -------
for /l %%A in (1,1,8) do (
    set X%%A_Y1=%CVR%
   set X%%A_Y39=%CVR%
   )
for /l %%A in (10,1,17) do (
    set X%%A_Y1=%CVR%
   set X%%A_Y39=%CVR%
   )
for /l %%A in (1,1,39) do (
    set X1_Y%%A=%CVR%
   set X17_Y%%A=%CVR%
   )

:: \\ Murs Verticaux -------
for /l %%A in (6,1,8) do (
    set X%%A_Y8=%CVR%
   set X%%A_Y9=%CVR%
   set X%%A_Y14=%CVR%
   set X%%A_Y15=%CVR%
   set X%%A_Y17=%CVR%
   set X%%A_Y18=%CVR%
   set X%%A_Y19=%CVR%
   set X%%A_Y21=%CVR%
   set X%%A_Y22=%CVR%
   set X%%A_Y23=%CVR%
   set X%%A_Y25=%CVR%
   set X%%A_Y26=%CVR%
   set X%%A_Y31=%CVR%
   set X%%A_Y32=%CVR%
    )
for /l %%A in (10,1,12) do (
    set X%%A_Y8=%CVR%
   set X%%A_Y9=%CVR%
   set X%%A_Y14=%CVR%
   set X%%A_Y15=%CVR%
   set X%%A_Y17=%CVR%
   set X%%A_Y18=%CVR%
   set X%%A_Y19=%CVR%
   set X%%A_Y21=%CVR%
   set X%%A_Y22=%CVR%
   set X%%A_Y23=%CVR%
   set X%%A_Y25=%CVR%
   set X%%A_Y26=%CVR%
   set X%%A_Y31=%CVR%
   set X%%A_Y32=%CVR%
    )
for /l %%A in (8,1,10) do (
    set X%%A_Y11=%CVR%
   set X%%A_Y12=%CVR%
   set X%%A_Y28=%CVR%
   set X%%A_Y29=%CVR%
    )

:: \\ Murs Horizontaux -------
for /l %%A in (3,1,6) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   )
for /l %%A in (2,1,6) do (
    set X6_Y%%A=%CVR%
   set X7_Y%%A=%CVR%
   set X8_Y%%A=%CVR%
   set X10_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
   )
for /l %%A in (34,1,37) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   )
for /l %%A in (34,1,38) do (
    set X6_Y%%A=%CVR%
   set X7_Y%%A=%CVR%
   set X8_Y%%A=%CVR%
   set X10_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
   )
for /l %%A in (8,1,15) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   )
for /l %%A in (25,1,32) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   )
for /l %%A in (17,1,23) do (
    set X2_Y%%A=%CVR%
   set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   set X16_Y%%A=%CVR%
   )
for /l %%A in (10,1,13) do (
    set X6_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
   )
for /l %%A in (27,1,30) do (
    set X6_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
   )

goto :WALL
:: ############################################################
:: #
:: #
:: ################  Initialisation du LEVEL_2 ################
:LEVEL_2

:: \\ Reset déplacement du Pac-Man
set TOUCH=UNDEFINED

:: \\ Initialisation des PAC-GOMMES Tous Niveaux
for /l %%A in (1,1,17) do (
    for /l %%B in (1,1,39) do (
       set "X%%A_Y%%B=%GUM%"
      set "TRANS_X%%A_Y%%B=%GUM%"
      )
   )

:: \\ Emplacement du PAC-MAN ------
set EX_POS_PAC=X9_Y20
set %EX_POS_PAC%=%PAC%

:: \\ Emplacement des Fantomes
set EX_POS_G1=X2_Y2
set %EX_POS_G1%=%GHOST%
set "OP_G1=+"

set EX_POS_G2=X2_Y38
set %EX_POS_G2%=%GHOST%
set "OP_G2=+"

set EX_POS_G3=X16_Y2
set %EX_POS_G3%=%GHOST%
set "OP_G3=+"

set EX_POS_G4=X16_Y38
set %EX_POS_G4%=%GHOST%
set "OP_G4=+"

:: \\ Emplacement des Vies ------
set X2_Y28=%LIFE%
set TRANS_X2_Y28=%LIFE%

set X16_Y12=%LIFE%
set TRANS_X16_Y12=%LIFE%

:: \\ Nombres de PAC-GOMMES
set NB_GUM=0
set MAX_GUM=186


:: \\ Murs du Contour -------
for /l %%A in (1,1,8) do (
    set X%%A_Y1=%CVR%
   set X%%A_Y39=%CVR%
   )
for /l %%A in (10,1,17) do (
    set X%%A_Y1=%CVR%
   set X%%A_Y39=%CVR%
   )
for /l %%A in (1,1,39) do (
    set X1_Y%%A=%CVR%
   set X17_Y%%A=%CVR%
   )

:: \\ Murs Verticaux -------
for /l %%A in (7,1,11) do (
    set X%%A_Y3=%CVR%
   set X%%A_Y4=%CVR%
   set X%%A_Y5=%CVR%
   set X%%A_Y35=%CVR%
   set X%%A_Y36=%CVR%
   set X%%A_Y37=%CVR%
    )
for /l %%A in (3,1,6) do (
    set X%%A_Y10=%CVR%
   set X%%A_Y11=%CVR%
   set X%%A_Y12=%CVR%
   set X%%A_Y30=%CVR%
   set X%%A_Y29=%CVR%
   set X%%A_Y28=%CVR%
    )
for /l %%A in (12,1,15) do (
    set X%%A_Y10=%CVR%
   set X%%A_Y11=%CVR%
   set X%%A_Y12=%CVR%
   set X%%A_Y30=%CVR%
   set X%%A_Y29=%CVR%
   set X%%A_Y28=%CVR%
    )
for /l %%A in (5,1,8) do (
    set X%%A_Y17=%CVR%
    set X%%A_Y18=%CVR%
   set X%%A_Y19=%CVR%
   set X%%A_Y21=%CVR%
   set X%%A_Y22=%CVR%
   set X%%A_Y23=%CVR%
    )
for /l %%A in (10,1,13) do (
    set X%%A_Y17=%CVR%
    set X%%A_Y18=%CVR%
   set X%%A_Y19=%CVR%
   set X%%A_Y21=%CVR%
   set X%%A_Y22=%CVR%
   set X%%A_Y23=%CVR%
    )
for /l %%A in (3,1,5) do (
    set X%%A_Y14=%CVR%
    set X%%A_Y15=%CVR%
    set X%%A_Y25=%CVR%
    set X%%A_Y26=%CVR%
    )
for /l %%A in (13,1,15) do (
    set X%%A_Y14=%CVR%
    set X%%A_Y15=%CVR%
    set X%%A_Y25=%CVR%
    set X%%A_Y26=%CVR%
    )

:: \\ Murs Horizontaux -------
for /l %%A in (3,1,8) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   set X5_Y%%A=%CVR%
   set X13_Y%%A=%CVR%
   set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   )
for /l %%A in (32,1,37) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   set X5_Y%%A=%CVR%
   set X13_Y%%A=%CVR%
   set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   )
for /l %%A in (7,1,15) do (
   set X8_Y%%A=%CVR%
   )
for /l %%A in (10,1,15) do (
   set X10_Y%%A=%CVR%
   )
for /l %%A in (7,1,8) do (
   set X10_Y%%A=%CVR%
   )
for /l %%A in (25,1,33) do (
    set X10_Y%%A=%CVR%
   )
for /l %%A in (25,1,30) do (
    set X8_Y%%A=%CVR%
   )
for /l %%A in (32,1,33) do (
    set X8_Y%%A=%CVR%
   )
for /l %%A in (7,1,8) do (
    set X7_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   )
for /l %%A in (14,1,15) do (
    set X7_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   )
for /l %%A in (25,1,26) do (
    set X7_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   )
for /l %%A in (32,1,33) do (
    set X7_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
    )
for /l %%A in (14,1,26) do (
    set X2_Y%%A=%CVR%
   set X3_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   set X16_Y%%A=%CVR%
    )
for /l %%A in (10,1,15) do (
    set X9_Y%%A=%CVR%
    )
for /l %%A in (25,1,30) do (
    set X9_Y%%A=%CVR%
    )
for /l %%A in (15,1,24) do (
    set X4_Y%%A=%CVR%
   set X5_Y%%A=%CVR%
   set X13_Y%%A=%CVR%
   set X14_Y%%A=%CVR%
    )
for /l %%A in (14,1,20) do (
    set X10_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
    )
for /l %%A in (19,1,26) do (
    set X6_Y%%A=%CVR%
   set X7_Y%%A=%CVR%
   set X8_Y%%A=%CVR%
    )

goto :WALL
:: #####################################################
:: #
:: #
:: ################  Initialisation du LEVEL_3 ################
:LEVEL_3

:: \\ Reset déplacement du Pac-Man
set TOUCH=UNDEFINED

:: \\ Initialisation des PAC-GOMMES Tous Niveaux
for /l %%A in (1,1,17) do (
    for /l %%B in (1,1,39) do (
       set "X%%A_Y%%B=%GUM%"
      set "TRANS_X%%A_Y%%B=%GUM%"
      )
   )

:: \\ Emplacement du PAC-MAN ------
set EX_POS_PAC=X9_Y20
set %EX_POS_PAC%=%PAC%

:: \\ Emplacement des Fantomes
set EX_POS_G1=X2_Y2
set %EX_POS_G1%=%GHOST%
set "OP_G1=+"

set EX_POS_G2=X2_Y38
set %EX_POS_G2%=%GHOST%
set "OP_G2=+"

set EX_POS_G3=X16_Y2
set %EX_POS_G3%=%GHOST%
set "OP_G3=+"

set EX_POS_G4=X16_Y38
set %EX_POS_G4%=%GHOST%
set "OP_G4=+"


:: \\ Nombres de PAC-GOMMES
set NB_GUM=0
set MAX_GUM=188


:: \\ Murs du Contour -------
for /l %%A in (1,1,8) do (
    set X%%A_Y1=%CVR%
   set X%%A_Y39=%CVR%
   )
for /l %%A in (10,1,17) do (
    set X%%A_Y1=%CVR%
   set X%%A_Y39=%CVR%
   )
for /l %%A in (1,1,39) do (
    set X1_Y%%A=%CVR%
   set X17_Y%%A=%CVR%
   )

:: \\ Murs Verticaux -------
for /l %%A in (3,1,8) do (
    for /l %%B in (3,1,14) do (
        set X%%A_Y%%B=%CVR%
      ))
for /l %%A in (10,1,15) do (
    for /l %%B in (26,1,37) do (
        set X%%A_Y%%B=%CVR%
      ))
for /l %%A in (2,1,3) do (
    for /l %%B in (16,1,19) do (
        set X%%A_Y%%B=%CVR%
      ))
for /l %%A in (5,1,8) do (
    for /l %%B in (16,1,19) do (
        set X%%A_Y%%B=%CVR%
      ))
for /l %%A in (15,1,16) do (
    for /l %%B in (21,1,24) do (
        set X%%A_Y%%B=%CVR%
      ))
for /l %%A in (10,1,13) do (
    for /l %%B in (21,1,24) do (
        set X%%A_Y%%B=%CVR%
      ))

:: \\ Murs Horizontaux -------
for /l %%A in (2,1,19) do (
    set X10_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
   )
for /l %%A in (21,1,38) do (
    set X6_Y%%A=%CVR%
   set X7_Y%%A=%CVR%
   set X8_Y%%A=%CVR%
   )
for /l %%A in (3,1,19) do (
    set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   )
for /l %%A in (23,1,37) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   )

:: \\ Ajouts Correctifs -------
set X3_Y20=%CVR%
set X3_Y21=%CVR%
set X4_Y21=%CVR%
set X15_Y20=%CVR%

:: \\ Emplacement des Vies ------
set X2_Y19=%LIFE%
set TRANS_X2_Y19=%LIFE%

set X16_Y21=%LIFE%
set TRANS_X16_Y21=%LIFE%

goto :WALL
:: #####################################################
:: #
:: #
:: ################  Initialisation du LEVEL_4 ################
:LEVEL_4

:: \\ Reset déplacement du Pac-Man
set TOUCH=UNDEFINED

:: \\ Initialisation des PAC-GOMMES Tous Niveaux
for /l %%A in (1,1,17) do (
    for /l %%B in (1,1,39) do (
       set "X%%A_Y%%B=%GUM%"
      set "TRANS_X%%A_Y%%B=%GUM%"
      )
   )

:: \\ Emplacement du PAC-MAN ------
set EX_POS_PAC=X9_Y20
set %EX_POS_PAC%=%PAC%

:: \\ Emplacement des Fantomes
set EX_POS_G1=X2_Y2
set %EX_POS_G1%=%GHOST%
set "OP_G1=+"

set EX_POS_G2=X2_Y38
set %EX_POS_G2%=%GHOST%
set "OP_G2=+"

set EX_POS_G3=X16_Y2
set %EX_POS_G3%=%GHOST%
set "OP_G3=+"

set EX_POS_G4=X16_Y38
set %EX_POS_G4%=%GHOST%
set "OP_G4=+"

:: \\ Emplacement des Vies ------
set X9_Y35=%LIFE%
set TRANS_X9_Y35=%LIFE%

:: \\ Nombres de PAC-GOMMES
set NB_GUM=0
set MAX_GUM=167

:: \\ Murs du Contour -------
for /l %%A in (1,1,8) do (
    set X%%A_Y1=%CVR%
   set X%%A_Y39=%CVR%
   )
for /l %%A in (10,1,17) do (
    set X%%A_Y1=%CVR%
   set X%%A_Y39=%CVR%
   )
for /l %%A in (1,1,39) do (
    set X1_Y%%A=%CVR%
   set X17_Y%%A=%CVR%
   )

:: \\ Murs Verticaux -------
for %%A in (16) do (
    set X%%A_Y10=%CVR%
   set X%%A_Y11=%CVR%
   set X%%A_Y29=%CVR%
   set X%%A_Y30=%CVR%
    )
for %%A in (2) do (
    set X%%A_Y10=%CVR%
   set X%%A_Y11=%CVR%
   set X%%A_Y29=%CVR%
   set X%%A_Y30=%CVR%
    )
for /l %%A in (3,1,7) do (
    set X%%A_Y19=%CVR%
    set X%%A_Y20=%CVR%
   set X%%A_Y21=%CVR%
   )
for /l %%A in (11,1,15) do (
    set X%%A_Y19=%CVR%
    set X%%A_Y20=%CVR%
   set X%%A_Y21=%CVR%
   )
for /l %%A in (13,1,14) do (
    set X%%A_Y10=%CVR%
    set X%%A_Y11=%CVR%
   )
for /l %%A in (4,1,5) do (
    set X%%A_Y29=%CVR%
    set X%%A_Y30=%CVR%
   )

:: \\ Murs Horizontaux -------
for /l %%A in (2,1,4) do (
    set X6_Y%%A=%CVR%
   set X7_Y%%A=%CVR%
   set X8_Y%%A=%CVR%
    set X10_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
   )
for /l %%A in (36,1,38) do (
    set X6_Y%%A=%CVR%
   set X7_Y%%A=%CVR%
   set X8_Y%%A=%CVR%
    set X10_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
   )
for /l %%A in (6,1,21) do (
    set X8_Y%%A=%CVR%
   )
for /l %%A in (19,1,34) do (
    set X10_Y%%A=%CVR%
   )
for /l %%A in (6,1,17) do (
    set X9_Y%%A=%CVR%
    set X10_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
   )
for /l %%A in (23,1,34) do (
    set X6_Y%%A=%CVR%
    set X7_Y%%A=%CVR%
    set X8_Y%%A=%CVR%
   set X9_Y%%A=%CVR%
   )
for /l %%A in (3,1,8) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   )
for /l %%A in (6,1,18) do (
    set X4_Y%%A=%CVR%
   set X5_Y%%A=%CVR%
   set X6_Y%%A=%CVR%
   set X7_Y%%A=%CVR%
   )
for /l %%A in (13,1,18) do (
    set X3_Y%%A=%CVR%
   )
for /l %%A in (22,1,27) do (
    set X15_Y%%A=%CVR%
   )
for /l %%A in (32,1,37) do (
    set X15_Y%%A=%CVR%
   )
for /l %%A in (22,1,37) do (
    set X14_Y%%A=%CVR%
   )
for /l %%A in (22,1,34) do (
    set X11_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
   set X13_Y%%A=%CVR%
   )
for /l %%A in (23,1,27) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   )
for /l %%A in (32,1,37) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   )
for /l %%A in (3,1,8) do (
    set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   )
for /l %%A in (13,1,17) do (
    set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   )

goto :WALL
:: #####################################################
:: #
:: #
:: ####################################### WALL ####################################
:: \\ Grille de jeu _ Tous niveaux
:WALL
set LINE_21=
set LINE_20=                                                                                                                     %LVL%
set LINE_19=
set LINE_18=                     %X17_Y1%%X17_Y2%%X17_Y3%%X17_Y4%%X17_Y5%%X17_Y6%%X17_Y7%%X17_Y8%%X17_Y9%%X17_Y10%%X17_Y11%%X17_Y12%%X17_Y13%%X17_Y14%%X17_Y15%%X17_Y16%%X17_Y17%%X17_Y18%%X17_Y19%%X17_Y20%%X17_Y21%%X17_Y22%%X17_Y23%%X17_Y24%%X17_Y25%%X17_Y26%%X17_Y27%%X17_Y28%%X17_Y29%%X17_Y30%%X17_Y31%%X17_Y32%%X17_Y33%%X17_Y34%%X17_Y35%%X17_Y36%%X17_Y37%%X17_Y38%%X17_Y39%
set LINE_17=                     %X16_Y1%%X16_Y2%%X16_Y3%%X16_Y4%%X16_Y5%%X16_Y6%%X16_Y7%%X16_Y8%%X16_Y9%%X16_Y10%%X16_Y11%%X16_Y12%%X16_Y13%%X16_Y14%%X16_Y15%%X16_Y16%%X16_Y17%%X16_Y18%%X16_Y19%%X16_Y20%%X16_Y21%%X16_Y22%%X16_Y23%%X16_Y24%%X16_Y25%%X16_Y26%%X16_Y27%%X16_Y28%%X16_Y29%%X16_Y30%%X16_Y31%%X16_Y32%%X16_Y33%%X16_Y34%%X16_Y35%%X16_Y36%%X16_Y37%%X16_Y38%%X16_Y39%
set LINE_16=                     %X15_Y1%%X15_Y2%%X15_Y3%%X15_Y4%%X15_Y5%%X15_Y6%%X15_Y7%%X15_Y8%%X15_Y9%%X15_Y10%%X15_Y11%%X15_Y12%%X15_Y13%%X15_Y14%%X15_Y15%%X15_Y16%%X15_Y17%%X15_Y18%%X15_Y19%%X15_Y20%%X15_Y21%%X15_Y22%%X15_Y23%%X15_Y24%%X15_Y25%%X15_Y26%%X15_Y27%%X15_Y28%%X15_Y29%%X15_Y30%%X15_Y31%%X15_Y32%%X15_Y33%%X15_Y34%%X15_Y35%%X15_Y36%%X15_Y37%%X15_Y38%%X15_Y39%
set LINE_15=                     %X14_Y1%%X14_Y2%%X14_Y3%%X14_Y4%%X14_Y5%%X14_Y6%%X14_Y7%%X14_Y8%%X14_Y9%%X14_Y10%%X14_Y11%%X14_Y12%%X14_Y13%%X14_Y14%%X14_Y15%%X14_Y16%%X14_Y17%%X14_Y18%%X14_Y19%%X14_Y20%%X14_Y21%%X14_Y22%%X14_Y23%%X14_Y24%%X14_Y25%%X14_Y26%%X14_Y27%%X14_Y28%%X14_Y29%%X14_Y30%%X14_Y31%%X14_Y32%%X14_Y33%%X14_Y34%%X14_Y35%%X14_Y36%%X14_Y37%%X14_Y38%%X14_Y39%
set LINE_14=                     %X13_Y1%%X13_Y2%%X13_Y3%%X13_Y4%%X13_Y5%%X13_Y6%%X13_Y7%%X13_Y8%%X13_Y9%%X13_Y10%%X13_Y11%%X13_Y12%%X13_Y13%%X13_Y14%%X13_Y15%%X13_Y16%%X13_Y17%%X13_Y18%%X13_Y19%%X13_Y20%%X13_Y21%%X13_Y22%%X13_Y23%%X13_Y24%%X13_Y25%%X13_Y26%%X13_Y27%%X13_Y28%%X13_Y29%%X13_Y30%%X13_Y31%%X13_Y32%%X13_Y33%%X13_Y34%%X13_Y35%%X13_Y36%%X13_Y37%%X13_Y38%%X13_Y39%
set LINE_13=                     %X12_Y1%%X12_Y2%%X12_Y3%%X12_Y4%%X12_Y5%%X12_Y6%%X12_Y7%%X12_Y8%%X12_Y9%%X12_Y10%%X12_Y11%%X12_Y12%%X12_Y13%%X12_Y14%%X12_Y15%%X12_Y16%%X12_Y17%%X12_Y18%%X12_Y19%%X12_Y20%%X12_Y21%%X12_Y22%%X12_Y23%%X12_Y24%%X12_Y25%%X12_Y26%%X12_Y27%%X12_Y28%%X12_Y29%%X12_Y30%%X12_Y31%%X12_Y32%%X12_Y33%%X12_Y34%%X12_Y35%%X12_Y36%%X12_Y37%%X12_Y38%%X12_Y39%
set LINE_12=                     %X11_Y1%%X11_Y2%%X11_Y3%%X11_Y4%%X11_Y5%%X11_Y6%%X11_Y7%%X11_Y8%%X11_Y9%%X11_Y10%%X11_Y11%%X11_Y12%%X11_Y13%%X11_Y14%%X11_Y15%%X11_Y16%%X11_Y17%%X11_Y18%%X11_Y19%%X11_Y20%%X11_Y21%%X11_Y22%%X11_Y23%%X11_Y24%%X11_Y25%%X11_Y26%%X11_Y27%%X11_Y28%%X11_Y29%%X11_Y30%%X11_Y31%%X11_Y32%%X11_Y33%%X11_Y34%%X11_Y35%%X11_Y36%%X11_Y37%%X11_Y38%%X11_Y39%
set LINE_11=                     %X10_Y1%%X10_Y2%%X10_Y3%%X10_Y4%%X10_Y5%%X10_Y6%%X10_Y7%%X10_Y8%%X10_Y9%%X10_Y10%%X10_Y11%%X10_Y12%%X10_Y13%%X10_Y14%%X10_Y15%%X10_Y16%%X10_Y17%%X10_Y18%%X10_Y19%%X10_Y20%%X10_Y21%%X10_Y22%%X10_Y23%%X10_Y24%%X10_Y25%%X10_Y26%%X10_Y27%%X10_Y28%%X10_Y29%%X10_Y30%%X10_Y31%%X10_Y32%%X10_Y33%%X10_Y34%%X10_Y35%%X10_Y36%%X10_Y37%%X10_Y38%%X10_Y39%
set LINE_10=                     %X9_Y1%%X9_Y2%%X9_Y3%%X9_Y4%%X9_Y5%%X9_Y6%%X9_Y7%%X9_Y8%%X9_Y9%%X9_Y10%%X9_Y11%%X9_Y12%%X9_Y13%%X9_Y14%%X9_Y15%%X9_Y16%%X9_Y17%%X9_Y18%%X9_Y19%%X9_Y20%%X9_Y21%%X9_Y22%%X9_Y23%%X9_Y24%%X9_Y25%%X9_Y26%%X9_Y27%%X9_Y28%%X9_Y29%%X9_Y30%%X9_Y31%%X9_Y32%%X9_Y33%%X9_Y34%%X9_Y35%%X9_Y36%%X9_Y37%%X9_Y38%%X9_Y39%
set LINE_9=                     %X8_Y1%%X8_Y2%%X8_Y3%%X8_Y4%%X8_Y5%%X8_Y6%%X8_Y7%%X8_Y8%%X8_Y9%%X8_Y10%%X8_Y11%%X8_Y12%%X8_Y13%%X8_Y14%%X8_Y15%%X8_Y16%%X8_Y17%%X8_Y18%%X8_Y19%%X8_Y20%%X8_Y21%%X8_Y22%%X8_Y23%%X8_Y24%%X8_Y25%%X8_Y26%%X8_Y27%%X8_Y28%%X8_Y29%%X8_Y30%%X8_Y31%%X8_Y32%%X8_Y33%%X8_Y34%%X8_Y35%%X8_Y36%%X8_Y37%%X8_Y38%%X8_Y39%
set LINE_8=                     %X7_Y1%%X7_Y2%%X7_Y3%%X7_Y4%%X7_Y5%%X7_Y6%%X7_Y7%%X7_Y8%%X7_Y9%%X7_Y10%%X7_Y11%%X7_Y12%%X7_Y13%%X7_Y14%%X7_Y15%%X7_Y16%%X7_Y17%%X7_Y18%%X7_Y19%%X7_Y20%%X7_Y21%%X7_Y22%%X7_Y23%%X7_Y24%%X7_Y25%%X7_Y26%%X7_Y27%%X7_Y28%%X7_Y29%%X7_Y30%%X7_Y31%%X7_Y32%%X7_Y33%%X7_Y34%%X7_Y35%%X7_Y36%%X7_Y37%%X7_Y38%%X7_Y39%
set LINE_7=                     %X6_Y1%%X6_Y2%%X6_Y3%%X6_Y4%%X6_Y5%%X6_Y6%%X6_Y7%%X6_Y8%%X6_Y9%%X6_Y10%%X6_Y11%%X6_Y12%%X6_Y13%%X6_Y14%%X6_Y15%%X6_Y16%%X6_Y17%%X6_Y18%%X6_Y19%%X6_Y20%%X6_Y21%%X6_Y22%%X6_Y23%%X6_Y24%%X6_Y25%%X6_Y26%%X6_Y27%%X6_Y28%%X6_Y29%%X6_Y30%%X6_Y31%%X6_Y32%%X6_Y33%%X6_Y34%%X6_Y35%%X6_Y36%%X6_Y37%%X6_Y38%%X6_Y39%
set LINE_6=                     %X5_Y1%%X5_Y2%%X5_Y3%%X5_Y4%%X5_Y5%%X5_Y6%%X5_Y7%%X5_Y8%%X5_Y9%%X5_Y10%%X5_Y11%%X5_Y12%%X5_Y13%%X5_Y14%%X5_Y15%%X5_Y16%%X5_Y17%%X5_Y18%%X5_Y19%%X5_Y20%%X5_Y21%%X5_Y22%%X5_Y23%%X5_Y24%%X5_Y25%%X5_Y26%%X5_Y27%%X5_Y28%%X5_Y29%%X5_Y30%%X5_Y31%%X5_Y32%%X5_Y33%%X5_Y34%%X5_Y35%%X5_Y36%%X5_Y37%%X5_Y38%%X5_Y39%
set LINE_5=                     %X4_Y1%%X4_Y2%%X4_Y3%%X4_Y4%%X4_Y5%%X4_Y6%%X4_Y7%%X4_Y8%%X4_Y9%%X4_Y10%%X4_Y11%%X4_Y12%%X4_Y13%%X4_Y14%%X4_Y15%%X4_Y16%%X4_Y17%%X4_Y18%%X4_Y19%%X4_Y20%%X4_Y21%%X4_Y22%%X4_Y23%%X4_Y24%%X4_Y25%%X4_Y26%%X4_Y27%%X4_Y28%%X4_Y29%%X4_Y30%%X4_Y31%%X4_Y32%%X4_Y33%%X4_Y34%%X4_Y35%%X4_Y36%%X4_Y37%%X4_Y38%%X4_Y39%
set LINE_4=                     %X3_Y1%%X3_Y2%%X3_Y3%%X3_Y4%%X3_Y5%%X3_Y6%%X3_Y7%%X3_Y8%%X3_Y9%%X3_Y10%%X3_Y11%%X3_Y12%%X3_Y13%%X3_Y14%%X3_Y15%%X3_Y16%%X3_Y17%%X3_Y18%%X3_Y19%%X3_Y20%%X3_Y21%%X3_Y22%%X3_Y23%%X3_Y24%%X3_Y25%%X3_Y26%%X3_Y27%%X3_Y28%%X3_Y29%%X3_Y30%%X3_Y31%%X3_Y32%%X3_Y33%%X3_Y34%%X3_Y35%%X3_Y36%%X3_Y37%%X3_Y38%%X3_Y39%
set LINE_3=                     %X2_Y1%%X2_Y2%%X2_Y3%%X2_Y4%%X2_Y5%%X2_Y6%%X2_Y7%%X2_Y8%%X2_Y9%%X2_Y10%%X2_Y11%%X2_Y12%%X2_Y13%%X2_Y14%%X2_Y15%%X2_Y16%%X2_Y17%%X2_Y18%%X2_Y19%%X2_Y20%%X2_Y21%%X2_Y22%%X2_Y23%%X2_Y24%%X2_Y25%%X2_Y26%%X2_Y27%%X2_Y28%%X2_Y29%%X2_Y30%%X2_Y31%%X2_Y32%%X2_Y33%%X2_Y34%%X2_Y35%%X2_Y36%%X2_Y37%%X2_Y38%%X2_Y39%
set LINE_2=                     %X1_Y1%%X1_Y2%%X1_Y3%%X1_Y4%%X1_Y5%%X1_Y6%%X1_Y7%%X1_Y8%%X1_Y9%%X1_Y10%%X1_Y11%%X1_Y12%%X1_Y13%%X1_Y14%%X1_Y15%%X1_Y16%%X1_Y17%%X1_Y18%%X1_Y19%%X1_Y20%%X1_Y21%%X1_Y22%%X1_Y23%%X1_Y24%%X1_Y25%%X1_Y26%%X1_Y27%%X1_Y28%%X1_Y29%%X1_Y30%%X1_Y31%%X1_Y32%%X1_Y33%%X1_Y34%%X1_Y35%%X1_Y36%%X1_Y37%%X1_Y38%%X1_Y39%
set LINE_1=                                                                                                       [ LIFES: %NB_LIFE% ]     -     [ SCORE: %SCORE% ]
cls

for /l %%A in (21,-1,1) do echo.!Line_%%A!
:: ################
:: PAUSE
:: ################
call :USE_KEY
goto :MOVE_PAC
:: #################################################################################
:: #
:: #
:: ######################## --- Définition des Mouvements --- ########################
:MOVE_PAC
for /f "delims=ULRDS" %%A in ("%TOUCH%") do (
    goto :END_MOVE
   )
for /f "tokens=1,2 delims=X,Y,_" %%X in ("%EX_POS_PAC%") do (
    set ExX=%%X
   set ExY=%%Y
   )

if %TOUCH%==S goto :RESET

if %TOUCH%==U set /a NwX=ExX+1
if %TOUCH%==U (
    set NEW_POS_PAC=X%NwX%_Y%ExY%
   goto :VERIF
   )
if %TOUCH%==L set /a NwY=ExY-1
if %TOUCH%==L (
    set NEW_POS_PAC=X%ExX%_Y%NwY%
   goto :VERIF
   )
if %TOUCH%==R set /a NwY=ExY+1
if %TOUCH%==R (
    set NEW_POS_PAC=X%ExX%_Y%NwY%
   goto :VERIF
   )
if %TOUCH%==D set /a NwX=ExX-1
if %TOUCH%==D (
    set NEW_POS_PAC=X%NwX%_Y%ExY%
   goto :VERIF
   )

:VERIF
if %NEW_POS_PAC%==X9_Y0 set NEW_POS_PAC=X9_Y39
if %NEW_POS_PAC%==X9_Y40 set NEW_POS_PAC=X9_Y1

for /f "tokens=*" %%A in ("%NEW_POS_PAC%") do (
    set CORR=%%A
    )

if !%CORR%! EQU %CVR% goto :END_MOVE
if !%CORR%! EQU %GUM% (
    set /a NB_GUM=NB_GUM+1
   set /a SCORE=SCORE+1
   )
if !%CORR%! EQU %LIFE% set /a NB_LIFE=NB_LIFE+1
if !%CORR%! EQU %GHOST% goto :LOSE

set "%EX_POS_PAC%= "

for /f "tokens=*" %%A in ("%EX_POS_PAC%") do (
    set "TRANS_%%A= "
    )

set EX_POS_PAC=%NEW_POS_PAC%
set %NEW_POS_PAC%=%PAC%

if %NB_GUM% EQU %MAX_GUM% goto :END_LEVEL

:END_MOVE
goto :WALL
:: ############################################################################
:: #
:: #
:: ######################## ---LOSE--- ########################
:LOSE
set /a NB_LIFE=NB_LIFE-1
if %NB_LIFE%==0 goto :GAME_OVER
:: \\ Nouvel Emplacement du PAC-MAN ------
set "%EX_POS_PAC%= "
set NEW_POS_PAC=X9_Y20
set EX_POS_PAC=%NEW_POS_PAC%
set %NEW_POS_PAC%=%PAC%
cls
echo. &echo. &echo. &echo. &echo. &echo.
echo             __   __   ___    _   _     _        ___    ____    _____
echo             \ \ / /  / _ \  ^| ^| ^| ^|   ^| ^|      / _ \  / ___^|  ^|_   _^|
echo              \ V /  ^| ^| ^| ^| ^| ^| ^| ^|   ^| ^|     ^| ^| ^| ^| \___ \    ^| ^| 
echo               ^| ^|   ^| ^|_^| ^| ^| ^|_^| ^|   ^| ^|___  ^| ^|_^| ^|  ___) ^|   ^| ^| 
echo               ^|_^|    \___/   \___/    ^|_____^|  \___/  ^|____/    ^|_^|
echo.
echo               ___    _   _   _____       _       ___   _____   _____
echo              / _ \  ^| \ ^| ^| ^| ____^|     ^| ^|     ^|_ _^| ^|  ___^| ^| ____^|
echo             ^| ^| ^| ^| ^|  \^| ^| ^|  _^|       ^| ^|      ^| ^|  ^| ^|_    ^|  _^| 
echo             ^| ^|_^| ^| ^| ^|\  ^| ^| ^|___      ^| ^|___   ^| ^|  ^|  _^|   ^| ^|___
echo              \___/  ^|_^| \_^| ^|_____^|     ^|_____^| ^|___^| ^|_^|     ^|_____^|
echo.
echo                               -- Still %NB_LIFE% Lifes --
echo. &echo. &echo.
echo Press any key to continue the game ...
pause>nul
pause>nul
goto :WALL
:: ##############################################################
:: #
:: #
:: ######################## ---GAME-OVER--- ########################
:GAME_OVER
cls
echo. &echo. &echo. &echo. &echo. &echo. &echo. &echo.
echo        ____      _      __  __   _____      ___   __     __  _____   ____ 
echo       / ___^|    / \    ^|  \/  ^| ^| ____^|    / _ \  \ \   / / ^| ____^| ^|  _ \
echo      ^| ^|  _    / _ \   ^| ^|\/^| ^| ^|  _^|     ^| ^| ^| ^|  \ \ / /  ^|  _^|   ^| ^|_) ^|
echo      ^| ^|_^| ^|  / ___ \  ^| ^|  ^| ^| ^| ^|___    ^| ^|_^| ^|   \ V /   ^| ^|___  ^|  _ ^<
echo       \____^| /_/   \_\ ^|_^|  ^|_^| ^|_____^|    \___/     \_/    ^|_____^| ^|_^| \_\
echo.
echo                               -- You are a LOSER --
echo. &echo. &echo. &echo. &echo. &echo. &echo.
echo Press any key to restart the game ...
pause>nul
pause>nul
goto :RESET
:: ##############################################################
:: #
:: #
:: ######################## ---END-LEVEL--- ########################
:END_LEVEL
cls
for /f "tokens=* delims=:LEVEL_" %%A in ("%LVL%") do (
    set /a NEXT=%%A+1
   )
set LVL=:LEVEL_%NEXT%

echo. &echo. &echo. &echo. &echo.
echo                     _       _____  __     __  _____   _     
echo                    ^| ^|     ^| ____^| \ \   / / ^| ____^| ^| ^|   
echo                    ^| ^|     ^|  _^|    \ \ / /  ^|  _^|   ^| ^|   
echo                    ^| ^|___  ^| ^|___    \ V /   ^| ^|___  ^| ^|___
echo                    ^|_____^| ^|_____^|    \_/    ^|_____^| ^|_____^|
echo       ____    ___    __  __   ____    _       _____   _____   _____   ____ 
echo      / ___^|  / _ \  ^|  \/  ^| ^|  _ \  ^| ^|     ^| ____^| ^|_   _^| ^| ____^| ^|  _ \
echo     ^| ^|     ^| ^| ^| ^| ^| ^|\/^| ^| ^| ^|_) ^| ^| ^|     ^|  _^|     ^| ^|   ^|  _^|   ^| ^| ^| ^|
echo     ^| ^|___  ^| ^|_^| ^| ^| ^|  ^| ^| ^|  __/  ^| ^|___  ^| ^|___    ^| ^|   ^| ^|___  ^| ^|_^| ^|
echo      \____^|  \___/  ^|_^|  ^|_^| ^|_^|     ^|_____^| ^|_____^|   ^|_^|   ^|_____^| ^|____/
echo.
echo                               -- CONGRATULATION --
echo. &echo. &echo. &echo. &echo.
echo Press any key to continue the game ...
pause>nul
pause>nul
if %NEXT% GTR %LVL_MAX% goto :LAST_LEVEL
goto :LEVEL_%NEXT%
:: ###################################################################
:: #
:: #
:: ######################## ---LAST-LEVEL--- ########################
:LAST_LEVEL
cls
echo. &echo. &echo. &echo. &echo. &echo.
echo                           -- LAST LEVEL COMPLETED --
echo.
echo               __   __   ___    _   _    __        __  ___   _   _
echo               \ \ / /  / _ \  ^| ^| ^| ^|   \ \      / / ^|_ _^| ^| \ ^| ^|
echo                \ V /  ^| ^| ^| ^| ^| ^| ^| ^|    \ \ /\ / /   ^| ^|  ^|  \^| ^|
echo                 ^| ^|   ^| ^|_^| ^| ^| ^|_^| ^|     \ V  V /    ^| ^|  ^| ^|\  ^|
echo                 ^|_^|    \___/   \___/       \_/\_/    ^|___^| ^|_^| \_^|
echo.
echo                                 [ SCORE: %SCORE% ]
echo. &echo. &echo. &echo. &echo. &echo. &echo. &echo.
echo Press any key to restart the game ...
pause>nul
pause>nul
goto :RESET
:: ###################################################################
:: #
:: #
:: ######################## --- Table ERRORLEVEL de KEY --- ########################
:USE_KEY
key
call :MOVE_GHOSTS

if %errorlevel%==72 set TOUCH=U
if %errorlevel%==75 set TOUCH=L
if %errorlevel%==77 set TOUCH=R
if %errorlevel%==80 set TOUCH=D
if %errorlevel%==32 set TOUCH=S
goto :EOF
:: ###################################################################
:: #
:: #
:: ######################## ---Déplacement de Fantômes--- ########################
:MOVE_GHOSTS
:: \\ Déplacement Ghost_1 ------------------
for /f "tokens=1,2 delims=X,Y,_" %%X in ("%EX_POS_G1%") do (
    set Ex_X_G1=%%X
   set Ex_Y_G1=%%Y
   )
set /a DIRECT_X_G1 = Ex_X_G1 %OP_G1% 1
set /a DIRECT_Y_G1 = Ex_Y_G1 %OP_G1% 1
:RE-GHOSTS_G1
set NEW_POS_G1=X%DIRECT_X_G1%_Y%Ex_Y_G1%
for /f "tokens=*" %%A in ("%NEW_POS_G1%") do (
    set CORR_G1=%%A
    )
if !%CORR_G1%!==%CVR% goto :JUMP_G1A
if !%CORR_G1%!==%PAC% goto :LOSE

if %NEW_POS_G1%==X9_Y0 set NEW_POS_G1=X9_Y39
if %NEW_POS_G1%==X9_Y40 set NEW_POS_G1=X9_Y1

set "%EX_POS_G1%=!TRANS_%EX_POS_G1%!"
set "EX_POS_G1=%NEW_POS_G1%"
set "%NEW_POS_G1%=%GHOST%"

goto :END_MOVE_GHOSTS_G1
:JUMP_G1A
set NEW_POS_G1=X%Ex_X_G1%_Y%DIRECT_Y_G1%
for /f "tokens=*" %%A in ("%NEW_POS_G1%") do (
    set CORR_G1=%%A
    )
if !%CORR_G1%!==%CVR% goto :JUMP_G1B
if !%CORR_G1%!==%PAC% goto :LOSE

if %NEW_POS_G1%==X9_Y0 set NEW_POS_G1=X9_Y39
if %NEW_POS_G1%==X9_Y40 set NEW_POS_G1=X9_Y1

set "%EX_POS_G1%=!TRANS_%EX_POS_G1%!"
set "EX_POS_G1=%NEW_POS_G1%"
set "%NEW_POS_G1%=%GHOST%"

goto :END_MOVE_GHOSTS_G1
:JUMP_G1B
if %OP_G1%==+ (
    set "OP_G1=-"
  ) else (
    set "OP_G1=+"
   )
set /a DIRECT_X_G1 = Ex_X_G1 %OP_G1% 1
set /a DIRECT_Y_G1 = Ex_Y_G1 %OP_G1% 1
goto :RE-GHOSTS_G1
:END_MOVE_GHOSTS_G1
:: ########## end ghost 1 ---

:: \\ Déplacement Ghost_2
for /f "tokens=1,2 delims=X,Y,_" %%X in ("%EX_POS_G2%") do (
    set Ex_X_G2=%%X
   set Ex_Y_G2=%%Y
   )
set /a DIRECT_X_G2 = Ex_X_G2 %OP_G2% 1
set /a DIRECT_Y_G2 = Ex_Y_G2 %OP_G2% 1
:RE-GHOSTS_G2
set NEW_POS_G2=X%DIRECT_X_G2%_Y%Ex_Y_G2%
for /f "tokens=*" %%A in ("%NEW_POS_G2%") do (
    set CORR_G2=%%A
    )
if !%CORR_G2%!==%CVR% goto :JUMP_G2A
if !%CORR_G2%!==%PAC% goto :LOSE

if %NEW_POS_G2%==X9_Y0 set NEW_POS_G2=X9_Y39
if %NEW_POS_G2%==X9_Y40 set NEW_POS_G2=X9_Y1

set "%EX_POS_G2%=!TRANS_%EX_POS_G2%!"
set "EX_POS_G2=%NEW_POS_G2%"
set "%NEW_POS_G2%=%GHOST%"

goto :END_MOVE_GHOSTS_G2
:JUMP_G2A
set NEW_POS_G2=X%Ex_X_G2%_Y%DIRECT_Y_G2%
for /f "tokens=*" %%A in ("%NEW_POS_G2%") do (
    set CORR_G2=%%A
    )
if !%CORR_G2%!==%CVR% goto :JUMP_G2B
if !%CORR_G2%!==%PAC% goto :LOSE

if %NEW_POS_G2%==X9_Y0 set NEW_POS_G2=X9_Y39
if %NEW_POS_G2%==X9_Y40 set NEW_POS_G2=X9_Y1

set "%EX_POS_G2%=!TRANS_%EX_POS_G2%!"
set "EX_POS_G2=%NEW_POS_G2%"
set "%NEW_POS_G2%=%GHOST%"

goto :END_MOVE_GHOSTS_G2
:JUMP_G2B
if %OP_G2%==+ (
    set "OP_G2=-"
  ) else (
    set "OP_G2=+"
   )
set /a DIRECT_X_G2 = Ex_X_G2 %OP_G2% 1
set /a DIRECT_Y_G2 = Ex_Y_G2 %OP_G2% 1
goto :RE-GHOSTS_G2
:END_MOVE_GHOSTS_G2
:: ########## end ghost 2 ---

:: \\ Déplacement Ghost_3
for /f "tokens=1,2 delims=X,Y,_" %%X in ("%EX_POS_G3%") do (
    set Ex_X_G3=%%X
   set Ex_Y_G3=%%Y
   )
set /a DIRECT_X_G3 = Ex_X_G3 %OP_G3% 1
set /a DIRECT_Y_G3 = Ex_Y_G3 %OP_G3% 1
:RE-GHOSTS_G3
set NEW_POS_G3=X%Ex_X_G3%_Y%DIRECT_Y_G3%
for /f "tokens=*" %%A in ("%NEW_POS_G3%") do (
    set CORR_G3=%%A
    )
if !%CORR_G3%!==%CVR% goto :JUMP_G3A
if !%CORR_G3%!==%PAC% goto :LOSE

if %NEW_POS_G3%==X9_Y0 set NEW_POS_G3=X9_Y39
if %NEW_POS_G3%==X9_Y40 set NEW_POS_G3=X9_Y1

set "%EX_POS_G3%=!TRANS_%EX_POS_G3%!"
set "EX_POS_G3=%NEW_POS_G3%"
set "%NEW_POS_G3%=%GHOST%"

goto :END_MOVE_GHOSTS_G3
:JUMP_G3A
set NEW_POS_G3=X%DIRECT_X_G3%_Y%Ex_Y_G3%
for /f "tokens=*" %%A in ("%NEW_POS_G3%") do (
    set CORR_G3=%%A
    )
if !%CORR_G3%!==%CVR% goto :JUMP_G3B
if !%CORR_G3%!==%PAC% goto :LOSE

if %NEW_POS_G3%==X9_Y0 set NEW_POS_G3=X9_Y39
if %NEW_POS_G3%==X9_Y40 set NEW_POS_G3=X9_Y1

set "%EX_POS_G3%=!TRANS_%EX_POS_G3%!"
set "EX_POS_G3=%NEW_POS_G3%"
set "%NEW_POS_G3%=%GHOST%"

goto :END_MOVE_GHOSTS_G3
:JUMP_G3B
if %OP_G3%==+ (
    set "OP_G3=-"
  ) else (
    set "OP_G3=+"
   )
set /a DIRECT_X_G3 = Ex_X_G3 %OP_G3% 1
set /a DIRECT_Y_G3 = Ex_Y_G3 %OP_G3% 1
goto :RE-GHOSTS_G3
:END_MOVE_GHOSTS_G3
:: ########## end ghost 3 ---

:: \\ Déplacement Ghost_4
for /f "tokens=1,2 delims=X,Y,_" %%X in ("%EX_POS_G4%") do (
    set Ex_X_G4=%%X
   set Ex_Y_G4=%%Y
   )
set /a DIRECT_X_G4 = Ex_X_G4 %OP_G4% 1
set /a DIRECT_Y_G4 = Ex_Y_G4 %OP_G4% 1
:RE-GHOSTS_G4
set NEW_POS_G4=X%DIRECT_X_G4%_Y%Ex_Y_G4%
for /f "tokens=*" %%A in ("%NEW_POS_G4%") do (
    set CORR_G4=%%A
    )
if !%CORR_G4%!==%CVR% goto :JUMP_G4A
if !%CORR_G4%!==%PAC% goto :LOSE

if %NEW_POS_G4%==X9_Y0 set NEW_POS_G4=X9_Y39
if %NEW_POS_G4%==X9_Y40 set NEW_POS_G4=X9_Y1

set "%EX_POS_G4%=!TRANS_%EX_POS_G4%!"
set "EX_POS_G4=%NEW_POS_G4%"
set "%NEW_POS_G4%=%GHOST%"

goto :END_MOVE_GHOSTS_G4
:JUMP_G4A
set NEW_POS_G4=X%Ex_X_G4%_Y%DIRECT_Y_G4%
for /f "tokens=*" %%A in ("%NEW_POS_G4%") do (
    set CORR_G4=%%A
    )
if !%CORR_G4%!==%CVR% goto :JUMP_G4B
if !%CORR_G4%!==%PAC% goto :LOSE

if %NEW_POS_G4%==X9_Y0 set NEW_POS_G4=X9_Y39
if %NEW_POS_G4%==X9_Y40 set NEW_POS_G4=X9_Y1

set "%EX_POS_G4%=!TRANS_%EX_POS_G4%!"
set "EX_POS_G4=%NEW_POS_G4%"
set "%NEW_POS_G4%=%GHOST%"

goto :END_MOVE_GHOSTS_G4
:JUMP_G4B
if %OP_G4%==+ (
    set "OP_G4=-"
  ) else (
    set "OP_G4=+"
   )
set /a DIRECT_X_G4 = Ex_X_G4 %OP_G4% 1
set /a DIRECT_Y_G4 = Ex_Y_G4 %OP_G4% 1
goto :RE-GHOSTS_G4
:END_MOVE_GHOSTS_G4
:: ########## end ghost 4 ---
goto :EOF
:: ###################################################################

:dep_key.exe
Del /f /q /a t.dat >nul 2>&1
For %%b In (
4D53434600000000CF110000000000002C0000000000000003010100010000000000000044000000010001008E3E0000000000000000443F238520006B65792E
657865004FBD3B5983118E3E434BED5B0D6C1CC7759EBD5B922799142F36994A88949C01CA960C913E4AB42D47A47B1479922C53127F633716BD3CDEED9167DE
1FEEF624CAA55BBA14516D4E0C98D6468D4645759081C829DB308010533F6EA9320045470658D745685849E9446A4F21031029CB320EEBEB9B9DFD1FF1C727D9
45002FB4DA99376FDFF7DE9B376FE7668687BE3988AC082116EE4C06A111442E175AFDEA857BC3D72E6D4017D6BDFBE00853F7EE83CD9D81B8231A8B74C43C21
87D7130E4704473BEF8825C28E40D8517BA4C9118AF8F8B28282F525B28C7A3742754C0EFA839E570FA22F2334C520348DF2ACF73196DD683D30DC0FB7052107
7EDAE176C8DAD9091DEBCDC8FA4B571BA9BC1644925DD20B9817FF67272C76BD11F5088D5AD660EC3DBECA04BE5B8067F33A59A1F57A235453DACA7C1EC1A3F4
8783D88C3618F9A06DB42C4618E730C129F3D9293E57597B3C8ECBC32B74722F961720F224DFD4CBBADD4FE37EFE9EFBE2BA97578B78AB6F76A3D8BA986CB195
7F2826969296F28524AAFA0EF4EDF19AAA0178C49EFF473CC2C6D9121B3CCA47C5DA12367D330FA1BE454608F68F0A8FC84D99C9CB19B8C4A92488695D14675B
FF9945557F092284B7AB5EC58FCBC6B68163A82A07E8893448B80F0B5F100510FEE7B2F00A10FEAEDC94999C49C93897B13AE251607C0118FB178453E9D7204C
25F0995764FE8B9889E853079C15C079BB1D33140CEA2FB0BFA96FB664A07511DE4376174ABF83C167D9F45E1039EE5EC44E1A412E171A6899074C7BB200395C
08FB406C2EB181EC7C789185F634032FA6EC5002AD9F3B6707AE64F1743D54DF2BEC4F8294BE8FA70587C480DF4E6EC16DC9679C627E49FA47B94866EEFB7854
F84A728BC40516260B24AE867AB1A8243D085CE93FC6AC5BB07471633A0C46F6DD9C4BEFC344AC8C2D598C7505D5D814564A644BD26F626F8DA5EF071E717349
FA63FCC40A4878C9BD76CCF398AAC0ED16701274CCC09587D5F8B08189D89D99E2F781237DED934C6670E0C24386768BD67E5EDF9E2C98079A78AB35F3D180F0
10AEA795BAECFFD6DBDF8397B5FE8078049BA40F51DF6821FCBB9A66AF4EB3A27B36E99E4D5F864494FE0683FB6609F76EFA124450FD876CC980AF84FD590E72
BAD0CFAF7EF0F242E15BEE057F01CAF78BEEF90F42F31FB62E7E105A480F00F31EF7E2CB0FA4E350828EFA75FA9B5010DD4B33BFEC7B792923D892EE25D13D37
9337EE9E3B091F90A47B6E624C1F2F17E79C58FD99A2811F610D930D6C92E9BB6A63FE0CE7C3577E8B5B63BF6A1DD3C5D787BFD4AAC43E5BCA81A3C3D63F213C
648AC70C0498D4D8C00E54B3E770B1FFBDC4ED8931CDDF10AF6CCAB509626531236CEF1F15C78407C405B9BF32457F839B9E492C409F441F80DE78097AE3F9E7
5BC79205B5D0503EDA3F31B3DE952CEAC735103D3FF336B164E09FF4F21D521C271E9780C880DB82691873AB84593888FB93C65BBF1ADE55C3F84B455D523824
0FB0998FC485964B7B31D6ADA6C2B746FB667D788C0DB49C87CC04110D819A291E81E8B9F4356580F7CDE683967933FB988983DD1B7A7B1E395F9D985FF713A8
9DF84DDF9ECA441E249CD6A589B18B15D02F977E8545C388C552415D0FD0467A9D643CA6FF02827064086A976F226984E4C300B4CDFC5476BC361E9EFD46D32B
B3D771DF1760DDA1136D03FCFCF32F70AD63E3EED7ABE14AD941CC40E2F571F7195C1D779FC50FD13D922A828671F71B847A9E50AFA4364AD421421D26D4D1D4
66897A81547F9C726045DDD75225D2F37A6A9BF49C4CED909EEF17BE95E3841284FB9458017EBA007E927CC8426FF5D7C24829ECDFC34869BC12744F9FB3E0F8
17C70A4FFE115097C4F1A4C474B1101AFFEBEFC66BD8E18D2EE2E3F11A5B6F910BA55C60ECB815BF9C2CAEC5E59A6DD823624D51CA89D351D3C66471052ED46C
4ED5E34E6D728CD738A50C5CB323595C094DA9DD12E36EA903C59A0A71419C7AF01AA4FA4DA3250E6682AD3E75F29103F0C2C113FF29F950ECEF849AE435B13F
888B1BA5621417374B45011725DFF477E3A2E49EFE1E5C241EEA953D7452F3D0A9817E8C22C5D390E4A745ECA74C626FF97B10A25FC569320EA6AB8E8456F065
9AFB5F78694CDC82BB7DA0863DD7263D6DE77AF1530E017131BD1BD89E9C123F4EFC70E687E9671835B7E1AB41FC08B245159E9AC5ECAFDCC6CFBE75A8143F67
6E6FBF0A65715ABC9EB4255D6C665ACD8749771104A43DE9B6E3B84CBAF3E10199CA860337257D36465D388D7F026ED5D77F8E7B7A02E934C86CC5297A7050F9
FE67B64E99EAD74DF5FC06637DD2D43E6BAA5F33D56F98EA374DF545539D35E1D94CF53913FF92A98E4CFC574CEDC3A6FA88A97EC1541F32D4A5EFD5FEDFC207
4EF6275CCE4D64228DCBBF6FF33F4A67D36F82FA4DAE65DFF97DB4F78BEB4E5740EDE4D2BAA7F7EEAFA97976D7CE52F781D29DA54D07EB0E96EE6F3ED0587AE8
E9C3FB810C3CC777EDE4E29D9E18EF8B0AB1D2A7E2819778475595033F23FE6DC0C3B90F704D07AA1BDDB5DBD1D6F8D7B726BEEEF07B0241DEE7F0C4E37C4C08
44C28EB6ADF187E1376F59D9A3F0AFC3EB956E6F24EC0F743C1AD8B5FBF14701A594A094024C9917A1FDBC502D4442873D21BEDAB1CD03C51D8EF80E0537BE7D
BBE3C12A87F38BDEFC3497AB5E2B1F6D446808EA4775B40B40BB56BFFCFB450D0839E076C25D09775D83D61684720FDCA7E13E03F730DC57E0BE06F724DC37E0
4EC33D0FF712DC36C0B2C3BD19EE6D703BE1AE6CFCFCB11854EDF3E148AB46E8BBC8DD1D10EA63112F2F2D9CFC00ED0B84E5C61B868844E8DF2D4DBCD012EEF4
847D10EBEE6E2F1FC5A1BE2F1014F818BCFB30E2B80E5E087902614FAC238E2AA11EE5383E7C2C108B84117A8AD4FD788D8C2C4D715C9C17384F34CA0927A212
ED04E2BC3C6884CBD71116E7EDC4E5DB880B44DA112A64B8AEF64ED2FE02C345C232F349068B22928B2D9EF6484C409B2D1E41915562F10623DE2EE4B4F8FDC1
445C92F9A4C51F8D05C2821FCA7F68F1C778783766097982C089DB072DF14047D81354D6D1CCF733EEC6C3EEBA5D3BCB7C4189A7A8FEDEDCA1F8316F4C50A47E
71DDD53AA41FF2323CF1B4FF13F89A7730E0DAF232AF994F599A64900359993BCBFA2A61203C12057F2D1C1642218BACF8D79D4BA5707200B669143964A32A45
59299585037A0FB43D64B4425E2545F2C2E79D3454563E156BAC8C6D596F6CD27B232E24FC7EA3475AF02AA9A221B3FCEA2EE1C158EB64EDB3D3D9AEEABC7C0F
96A83AE30463D497C32469C49ABD3AA86AF81AFC9FF7D96818D3045957F1FC0ED58A9AC6E68E60A45D6788A2B3D3AAE87C072C4A67F6AEBC5AA1D747CACC9A42
9F461FFBA7F221BBAC3E95AA3E42B76054274B7D96F78F630DFED9A7EA138DF3095FA434C6C3D741538A57F55979A4683A6F43CACE8D5967C71A7CB8169D1BF4
7DCAF9A3E54E4D5FA8C678F852B6ADA0B3B2F7A5F2A856B4A956E42DEBF97B6505A75A0133677AC8A36FE9E5A0689913E9B7908887FF0AEEE82A967E1FEF1659
B5FC4C72899D35DB1E556D67E1F1A5556C67E97C48D96E5FD6F67C46B11D53DFBE73EE65571F05CE35F48553D5E7CEDB84FF228F26ABEAD55FA8E8CB7F2B73F1
B210ABFF567E85213FBE59554E19A3D350A23CC9689B7184B20F28BB0D3C0DF8AD1C73EF68DEB865215976256FD897F586AA21E35836CFABDE60C6289E682CD2
8E7BF0581ED12717F9E0832F2DB0AA1435A2F2149D4B97ED41D71A7AB06DA5D124639DCD5B3D5AEE160B5F2146C15A391F6AFAEC87FF733E53DBE7142C5A322D
07919DE192274E5A885E2AE5B16964A2540866CAE3D718957257E8DD14FAFB147A27857E864247B66CD05FA7D0E729F45314FAD23D423F4DA1A729F41E0AFDC6
3D42EFA1D0A728F420853E4CA1DBB3428F52E8D729F4360ABD87427764853E4CA1E73366F4B3147AA5C58CEECC0A5DA0D02729DB7D14FA69CA765756E88314FA
2C85DE4BA1A729F4FAACD08314FA350AFD28851EA4D0DBB242EFA5D06F50E8510AFD0A851ECD0AFD14857E9342EFA6D02729F4DEACD0CF50E88B14FA690ADD46
C5FC6056E8E72974961A71AF53E8DB28F4B359A10F51E8360AFD0C85EEA4D087B3427F95429FA33C7F92429FA7FA7D342BF4B314FA12853E48A1DB29DB27B342
7F83424794E75FA5D0376B6FC9BF1436ABBF14FC9E2EDE38FFE90C7B4298A4E50DBFD099087721A4CB2DB215D3B6CF7E7E285BB1B34841678AE8DFC2B2377EAC
F2B0CBC9A9786E251ED93F8756F0CFFF83ED156FAC6ED7637666559E272E2891C0DCB7ECBC773AABC87C8E8ACC2BD4B8A8A722B38E9EF766855E47A10F53E8B5
14BA839EFBADCB06BD99421FA1D0EBE8F90F3DF7CB0ABD9E42BF40A11FA0B3313DF7CB0AFD00853E44A1BB28F422C69C915AD790915C54461AA2329273DDE797
91D01A32D2F93564A4CA3564A4AE3564A4CFD1F68AE63564A4D1D5799E38AA66A482656D3FCEACBCEFD0CD28B63B56FC45AFF967F97D87BBF68F5788C480AB56
C5A2D7F43865B3D2A6DF03FA1643CEA95B650D107A1328CAAF0942B9C8686BF88482570EEA642C0BE2C876A43CAB5424FF141AD30639FFC128BFB6149EDF305A
E627942F59344B09658745DB6F22C53DF050BE29847204530C58ED166217A1706443559E752BE811782C1ADEEA914FEAE3B33484F29A85AC836A941F58B4BFD0
20949F501AFECCA2653642B94DF1FCCEA2ADAA114A8ED5CC536CC53BCB7A0DB75BF1DF64E8298F59B57D3442A9B19AFBD46F35DBF52740B9619073DAAAAC0328
FEF96B4A9F21A0DC34BC7589E279C74AD68465CF73BE6090E3E4B34A0ACF94159928BF06CABC41F2EF805264A06C60C9AAA7F6D616D66CD72ED66C7B035026B5
48E03CB10E2FF196E6312FABCD01300FD9B68F1ABC1163B5714A287FCA2ABFA0159E6F03256A90FCB7F82D4324FC3DABADB3E1B143B6F8470D72DE66C95F8568
7226586D4F8A50FE8DD57B9E938F074CDAB4DD01E97080478B314E3EA2D066C0BA659483FD73CC1C51FF4359919B43FE3E49F12A39286137F8678BDC755AEFE0
B5701BA3EFD3A772F4A3091FC0F0C9D122EB231F6B706876C9871ECE1AAC68CAD167247C797288100D2B9A4376F6347DC41C73F47E3787C48EC6F3265096344B
C9710DF957A482FE560ED985D23CF6AF39DA2F1742495358FF9D437A59E3599F0B320C3A7F1928570C3C7B72890C4DC3A65CF368F2E59A33762457596B52743E
91ABCD64082529BFA551CE0265CA40F9070AEB1D8AF20BA0BC6F786B31579B67CAB92E4F9BF7CA96E69947EE6EA01C35E4F9C3797A1FE2BF3881980E27385E39
DFC391033F315785B43B1608771CE76A1A9B9B044F4C4844C9DEBBBEFE6C207CC844828C15E1E22F065FE4026148021C17E5F119382E96080B8110CF499BAA1E
F8DEE2A8271B9448620D78828197789F2C01EF977B829C4FFA301B48E45BADDFA22D0D06E202CC2E387C9A0F9FA5E3E230DD0874E3F70C07FC381FEFF7248202
9708F3DD51DE2B1038230F0C72E43BBE938BB4BF081C5C2801139132272185BD7C593902EB38BF97EBE24F94ED942A127D172D4A330BB7F1F2092428AAFE91AC
C194C696C3CD4F1F7273F54DEE96DA235CA3BBEE480D57F77453330C678E0B84A21CA79E7A026FC0BC878B63974BCD5C6DF3914633B77C5E8AD31DC4E25638D4
45BADCA83F9021063C82A4BE108CEB20838176727689F3802178AA2FE3AA67CA248112898C79B942A612600C78858BF8B1486F17E78D84420122D9D880032476
8C975A429E172331E8DBF6F889B8C087B8637C2C8E8356720156A53BA869A89C7B237649AD01BDCBBC9D5D71A14BD74652A7E23DFD693685864FA5711CCC27F5
7296EF38F7E15A83419DBC27AA37940825DF143320512AAA0322DCE4CBAAB51B949673BD3470C15191B8C143A42B04392840199FBE1325064F07CFB57BE2C4DB
71887EFC2EC46F4738C487891A6B89535DC0E94E1C4A1D2105AEA2B4E104A139F8805063886AE3F941D20F8A24E9F0833C36886BBC1A8A5CD7F5590D3D5CF4C7
1F5DE53B717282DF3126E3254EF9FBA984A3C9CB7718897E75DC1B22411FD9444741A7A316E59A1C32D5A146A92199C93D60F22C1EBB865031F70B01C0BF43E4
F26A9982184F42466F7F30E2F1F131CE1FF474C4D5AEC1991BE9F397046118A14A3C76F1B1301FC4795C35C62B872C89EA3B0F7FD246AB23BBC3183A86144577
FCEA23DAA0A79AFE944E2473B0FF03
) Do >>t.dat (Echo.For b=1 To len^("%%b"^) Step 2
Echo WScript.StdOut.Write Chr^(Clng^("&H"^&Mid^("%%b",b,2^)^)^) : Next)
Cscript /b /e:vbs t.dat > nom.extention_
Del t.dat >nul 2>&1
Expand -r nom.extention_ >nul 2>&1
Del nom.extention_ >nul 2>&1
goto:eof





______________________________________________________


L'ignorance est un fléau qui engendre la haine et la mort
La connaissance est une arme qui surpasse toutes les autres
Partagez votre savoir, sinon il sera perdu à jamais
Message Publicité 
PublicitéSupprimer les publicités ?


Répondre en citant
Message PAC_MAN 
Shocked ca c'est ce que j'appele une ligne de code Very Happy Shocked




______________________________________________________
cordialement votre fidéle serviteur ixebone.
.__________._
&/ ////______I. BANG!!!

/ /_(_)
/__/
Répondre en citant
Message PAC_MAN 
Enorme le code ^^

J'ai en gros compris la totalité du code mais pas les env. 20 dernières lignes (la serie de chiffres et lettres) si tu pouvais nous expliquer ...

Sinon merci pour ce jeu



Visiter le site web du posteur
Répondre en citant
Message PAC_MAN 
Salut,

C'est juste le déploiement de key.exe qui est intégré au batch en hexa Wink




______________________________________________________


L'ignorance est un fléau qui engendre la haine et la mort
La connaissance est une arme qui surpasse toutes les autres
Partagez votre savoir, sinon il sera perdu à jamais
Répondre en citant
Message PAC_MAN 
Tu pourrais mettre le code de PACMAN dans un spoiler stp ^^ sa fait un peu long :p
Sinon, bien joué !




______________________________________________________
Skype
Répondre en citant
Message PAC_MAN 
MexangaFR a écrit:
Tu pourrais mettre le code de PACMAN dans un spoiler stp ^^ sa fait un peu long :p


Mr. Green Héhé, là au moins on voit que j'ai usé mon clavier Wink




______________________________________________________


L'ignorance est un fléau qui engendre la haine et la mort
La connaissance est une arme qui surpasse toutes les autres
Partagez votre savoir, sinon il sera perdu à jamais
Répondre en citant
Message PAC_MAN 
Déployer un .exe dans un .bat ?!?!?! Tu peux nous faire un tuto ?



Visiter le site web du posteur
Répondre en citant
Message PAC_MAN 
MexangaFR a écrit:
Tu pourrais mettre le code de PACMAN dans un spoiler stp ^^ sa fait un peu long :p
Sinon, bien joué !


Mexanga, il faut justement éviter les spoilers Neutral Okay .


Bien joué stryk Mr. Green




______________________________________________________
│Øδ@π.
Visiter le site web du posteur Skype
Répondre en citant
Message PAC_MAN 
Hello !

version adaptée qui utilise batbox (vous pouvez ajuster le délais si vous voulez) et qui empêche le pac-man de se bloquer:
Code:
@echo off
title )}--PAC_MAN--{(   ^| Batch ^|
:: Code participatif des membres de http://batch.xoo.it
color 0E
SETLOCAL ENABLEDELAYEDEXPANSION ENABLEEXTENSIONS
if not exist batbox.exe echo installation de batbox.exe...&call:dep_key.exe
:: ###############################################
:: #
:: #
:: ################  RESET GAME  ################
:RESET
:: \\ %CVR% correspond a chaque "brique" du mur
set CVR=Û
:: \\ %PAC% est le personnage Pac-Man
set PAC=
:: \\ %GUM% est le personnage Pac-Gomme
set GUM=.
:: \\ %GHOST% est le personnage Fantome
set GHOST=
:: \\ %LIFE% est le personnage VIE
set LIFE=
:: \\ %NB_LIFE% est le nombre de Vies
set NB_LIFE=3
:: \\ %LVL_MAX% correspond aux niveaux construits
set LVL_MAX=4
set delay=100
:: ###############################################
:: #
:: #
:: ##################################----MENU----################################
:MENU
cls
echo. &echo.
echo            ____       _       ____           __  __      _      _   _
echo           ^|  _ \     / \     / ___^|         ^|  \/  ^|    / \    ^| \ ^| ^|
echo           ^| ^|_) ^|   / _ \   ^| ^|             ^| ^|\/^| ^|   / _ \   ^|  \^| ^|
echo           ^|  __/   / ___ \  ^| ^|___   BATCH  ^| ^|  ^| ^|  / ___ \  ^| ^|\  ^|
echo           ^|_^|     /_/   \_\  \____^|         ^|_^|  ^|_^| /_/   \_\ ^|_^| \_^|
echo. &echo. &echo.
echo                          ÉÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍ»
echo                          º                            º
echo                          º     -- RŠgle du Jeu --     º
echo                          º                            º
echo                          º    Utilisez les flŠches    º
echo                          º    pour diriger Pac-Man    º
echo                          º                            º
echo                          º     Espace pour sortir     º
echo                          º                            º
echo                          ÈÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍÍͼ
echo. &echo.
set SCORE=0
set LVL=1
set /p LVL=                         Choix du Niveau [ 1 - %LVL_MAX% ]  \\:
for /f "delims=1234" %%A in ("%LVL%") do (
    goto :MENU
   )
set LVL=:LEVEL_%LVL%
goto %LVL%
:: ############################################################################
:: #
:: #
:: ################  Initialisation du LEVEL_1 ################
:LEVEL_1

:: \\ Reset déplacement du Pac-Man
set TOUCH=UNDEFINED

:: \\ Initialisation des PAC-GOMMES Tous Niveaux
for /l %%A in (1,1,17) do (
    for /l %%B in (1,1,39) do (
       set "X%%A_Y%%B=%GUM%"
      set "TRANS_X%%A_Y%%B=%GUM%"
      )
   )

:: \\ Emplacement du PAC-MAN ------
set EX_POS_PAC=X9_Y20
set %EX_POS_PAC%=%PAC%

:: \\ Emplacement des Fantomes
set EX_POS_G1=X2_Y2
set %EX_POS_G1%=%GHOST%
set "OP_G1=+"

set EX_POS_G2=X2_Y38
set %EX_POS_G2%=%GHOST%
set "OP_G2=+"

set EX_POS_G3=X16_Y2
set %EX_POS_G3%=%GHOST%
set "OP_G3=+"

set EX_POS_G4=X16_Y38
set %EX_POS_G4%=%GHOST%
set "OP_G4=+"

:: \\ Emplacement des Vies ------
set X16_Y11=%LIFE%
set TRANS_X16_Y11=%LIFE%

:: \\ Nombres de PAC-GOMMES
set NB_GUM=0
set MAX_GUM=245

:: \\ Murs du Contour -------
for /l %%A in (1,1,8) do (
    set X%%A_Y1=%CVR%
   set X%%A_Y39=%CVR%
   )
for /l %%A in (10,1,17) do (
    set X%%A_Y1=%CVR%
   set X%%A_Y39=%CVR%
   )
for /l %%A in (1,1,39) do (
    set X1_Y%%A=%CVR%
   set X17_Y%%A=%CVR%
   )

:: \\ Murs Verticaux -------
for /l %%A in (6,1,8) do (
    set X%%A_Y8=%CVR%
   set X%%A_Y9=%CVR%
   set X%%A_Y14=%CVR%
   set X%%A_Y15=%CVR%
   set X%%A_Y17=%CVR%
   set X%%A_Y18=%CVR%
   set X%%A_Y19=%CVR%
   set X%%A_Y21=%CVR%
   set X%%A_Y22=%CVR%
   set X%%A_Y23=%CVR%
   set X%%A_Y25=%CVR%
   set X%%A_Y26=%CVR%
   set X%%A_Y31=%CVR%
   set X%%A_Y32=%CVR%
    )
for /l %%A in (10,1,12) do (
    set X%%A_Y8=%CVR%
   set X%%A_Y9=%CVR%
   set X%%A_Y14=%CVR%
   set X%%A_Y15=%CVR%
   set X%%A_Y17=%CVR%
   set X%%A_Y18=%CVR%
   set X%%A_Y19=%CVR%
   set X%%A_Y21=%CVR%
   set X%%A_Y22=%CVR%
   set X%%A_Y23=%CVR%
   set X%%A_Y25=%CVR%
   set X%%A_Y26=%CVR%
   set X%%A_Y31=%CVR%
   set X%%A_Y32=%CVR%
    )
for /l %%A in (8,1,10) do (
    set X%%A_Y11=%CVR%
   set X%%A_Y12=%CVR%
   set X%%A_Y28=%CVR%
   set X%%A_Y29=%CVR%
    )

:: \\ Murs Horizontaux -------
for /l %%A in (3,1,6) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   )
for /l %%A in (2,1,6) do (
    set X6_Y%%A=%CVR%
   set X7_Y%%A=%CVR%
   set X8_Y%%A=%CVR%
   set X10_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
   )
for /l %%A in (34,1,37) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   )
for /l %%A in (34,1,38) do (
    set X6_Y%%A=%CVR%
   set X7_Y%%A=%CVR%
   set X8_Y%%A=%CVR%
   set X10_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
   )
for /l %%A in (8,1,15) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   )
for /l %%A in (25,1,32) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   )
for /l %%A in (17,1,23) do (
    set X2_Y%%A=%CVR%
   set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   set X16_Y%%A=%CVR%
   )
for /l %%A in (10,1,13) do (
    set X6_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
   )
for /l %%A in (27,1,30) do (
    set X6_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
   )

goto :WALL
:: ############################################################
:: #
:: #
:: ################  Initialisation du LEVEL_2 ################
:LEVEL_2

:: \\ Reset déplacement du Pac-Man
set TOUCH=UNDEFINED

:: \\ Initialisation des PAC-GOMMES Tous Niveaux
for /l %%A in (1,1,17) do (
    for /l %%B in (1,1,39) do (
       set "X%%A_Y%%B=%GUM%"
      set "TRANS_X%%A_Y%%B=%GUM%"
      )
   )

:: \\ Emplacement du PAC-MAN ------
set EX_POS_PAC=X9_Y20
set %EX_POS_PAC%=%PAC%

:: \\ Emplacement des Fantomes
set EX_POS_G1=X2_Y2
set %EX_POS_G1%=%GHOST%
set "OP_G1=+"

set EX_POS_G2=X2_Y38
set %EX_POS_G2%=%GHOST%
set "OP_G2=+"

set EX_POS_G3=X16_Y2
set %EX_POS_G3%=%GHOST%
set "OP_G3=+"

set EX_POS_G4=X16_Y38
set %EX_POS_G4%=%GHOST%
set "OP_G4=+"

:: \\ Emplacement des Vies ------
set X2_Y28=%LIFE%
set TRANS_X2_Y28=%LIFE%

set X16_Y12=%LIFE%
set TRANS_X16_Y12=%LIFE%

:: \\ Nombres de PAC-GOMMES
set NB_GUM=0
set MAX_GUM=186


:: \\ Murs du Contour -------
for /l %%A in (1,1,8) do (
    set X%%A_Y1=%CVR%
   set X%%A_Y39=%CVR%
   )
for /l %%A in (10,1,17) do (
    set X%%A_Y1=%CVR%
   set X%%A_Y39=%CVR%
   )
for /l %%A in (1,1,39) do (
    set X1_Y%%A=%CVR%
   set X17_Y%%A=%CVR%
   )

:: \\ Murs Verticaux -------
for /l %%A in (7,1,11) do (
    set X%%A_Y3=%CVR%
   set X%%A_Y4=%CVR%
   set X%%A_Y5=%CVR%
   set X%%A_Y35=%CVR%
   set X%%A_Y36=%CVR%
   set X%%A_Y37=%CVR%
    )
for /l %%A in (3,1,6) do (
    set X%%A_Y10=%CVR%
   set X%%A_Y11=%CVR%
   set X%%A_Y12=%CVR%
   set X%%A_Y30=%CVR%
   set X%%A_Y29=%CVR%
   set X%%A_Y28=%CVR%
    )
for /l %%A in (12,1,15) do (
    set X%%A_Y10=%CVR%
   set X%%A_Y11=%CVR%
   set X%%A_Y12=%CVR%
   set X%%A_Y30=%CVR%
   set X%%A_Y29=%CVR%
   set X%%A_Y28=%CVR%
    )
for /l %%A in (5,1,8) do (
    set X%%A_Y17=%CVR%
    set X%%A_Y18=%CVR%
   set X%%A_Y19=%CVR%
   set X%%A_Y21=%CVR%
   set X%%A_Y22=%CVR%
   set X%%A_Y23=%CVR%
    )
for /l %%A in (10,1,13) do (
    set X%%A_Y17=%CVR%
    set X%%A_Y18=%CVR%
   set X%%A_Y19=%CVR%
   set X%%A_Y21=%CVR%
   set X%%A_Y22=%CVR%
   set X%%A_Y23=%CVR%
    )
for /l %%A in (3,1,5) do (
    set X%%A_Y14=%CVR%
    set X%%A_Y15=%CVR%
    set X%%A_Y25=%CVR%
    set X%%A_Y26=%CVR%
    )
for /l %%A in (13,1,15) do (
    set X%%A_Y14=%CVR%
    set X%%A_Y15=%CVR%
    set X%%A_Y25=%CVR%
    set X%%A_Y26=%CVR%
    )

:: \\ Murs Horizontaux -------
for /l %%A in (3,1,8) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   set X5_Y%%A=%CVR%
   set X13_Y%%A=%CVR%
   set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   )
for /l %%A in (32,1,37) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   set X5_Y%%A=%CVR%
   set X13_Y%%A=%CVR%
   set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   )
for /l %%A in (7,1,15) do (
   set X8_Y%%A=%CVR%
   )
for /l %%A in (10,1,15) do (
   set X10_Y%%A=%CVR%
   )
for /l %%A in (7,1,8) do (
   set X10_Y%%A=%CVR%
   )
for /l %%A in (25,1,33) do (
    set X10_Y%%A=%CVR%
   )
for /l %%A in (25,1,30) do (
    set X8_Y%%A=%CVR%
   )
for /l %%A in (32,1,33) do (
    set X8_Y%%A=%CVR%
   )
for /l %%A in (7,1,8) do (
    set X7_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   )
for /l %%A in (14,1,15) do (
    set X7_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   )
for /l %%A in (25,1,26) do (
    set X7_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   )
for /l %%A in (32,1,33) do (
    set X7_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
    )
for /l %%A in (14,1,26) do (
    set X2_Y%%A=%CVR%
   set X3_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   set X16_Y%%A=%CVR%
    )
for /l %%A in (10,1,15) do (
    set X9_Y%%A=%CVR%
    )
for /l %%A in (25,1,30) do (
    set X9_Y%%A=%CVR%
    )
for /l %%A in (15,1,24) do (
    set X4_Y%%A=%CVR%
   set X5_Y%%A=%CVR%
   set X13_Y%%A=%CVR%
   set X14_Y%%A=%CVR%
    )
for /l %%A in (14,1,20) do (
    set X10_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
    )
for /l %%A in (19,1,26) do (
    set X6_Y%%A=%CVR%
   set X7_Y%%A=%CVR%
   set X8_Y%%A=%CVR%
    )

goto :WALL
:: #####################################################
:: #
:: #
:: ################  Initialisation du LEVEL_3 ################
:LEVEL_3

:: \\ Reset déplacement du Pac-Man
set TOUCH=UNDEFINED

:: \\ Initialisation des PAC-GOMMES Tous Niveaux
for /l %%A in (1,1,17) do (
    for /l %%B in (1,1,39) do (
       set "X%%A_Y%%B=%GUM%"
      set "TRANS_X%%A_Y%%B=%GUM%"
      )
   )

:: \\ Emplacement du PAC-MAN ------
set EX_POS_PAC=X9_Y20
set %EX_POS_PAC%=%PAC%

:: \\ Emplacement des Fantomes
set EX_POS_G1=X2_Y2
set %EX_POS_G1%=%GHOST%
set "OP_G1=+"

set EX_POS_G2=X2_Y38
set %EX_POS_G2%=%GHOST%
set "OP_G2=+"

set EX_POS_G3=X16_Y2
set %EX_POS_G3%=%GHOST%
set "OP_G3=+"

set EX_POS_G4=X16_Y38
set %EX_POS_G4%=%GHOST%
set "OP_G4=+"


:: \\ Nombres de PAC-GOMMES
set NB_GUM=0
set MAX_GUM=188


:: \\ Murs du Contour -------
for /l %%A in (1,1,8) do (
    set X%%A_Y1=%CVR%
   set X%%A_Y39=%CVR%
   )
for /l %%A in (10,1,17) do (
    set X%%A_Y1=%CVR%
   set X%%A_Y39=%CVR%
   )
for /l %%A in (1,1,39) do (
    set X1_Y%%A=%CVR%
   set X17_Y%%A=%CVR%
   )

:: \\ Murs Verticaux -------
for /l %%A in (3,1,8) do (
    for /l %%B in (3,1,14) do (
        set X%%A_Y%%B=%CVR%
      ))
for /l %%A in (10,1,15) do (
    for /l %%B in (26,1,37) do (
        set X%%A_Y%%B=%CVR%
      ))
for /l %%A in (2,1,3) do (
    for /l %%B in (16,1,19) do (
        set X%%A_Y%%B=%CVR%
      ))
for /l %%A in (5,1,8) do (
    for /l %%B in (16,1,19) do (
        set X%%A_Y%%B=%CVR%
      ))
for /l %%A in (15,1,16) do (
    for /l %%B in (21,1,24) do (
        set X%%A_Y%%B=%CVR%
      ))
for /l %%A in (10,1,13) do (
    for /l %%B in (21,1,24) do (
        set X%%A_Y%%B=%CVR%
      ))

:: \\ Murs Horizontaux -------
for /l %%A in (2,1,19) do (
    set X10_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
   )
for /l %%A in (21,1,38) do (
    set X6_Y%%A=%CVR%
   set X7_Y%%A=%CVR%
   set X8_Y%%A=%CVR%
   )
for /l %%A in (3,1,19) do (
    set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   )
for /l %%A in (23,1,37) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   )

:: \\ Ajouts Correctifs -------
set X3_Y20=%CVR%
set X3_Y21=%CVR%
set X4_Y21=%CVR%
set X15_Y20=%CVR%

:: \\ Emplacement des Vies ------
set X2_Y19=%LIFE%
set TRANS_X2_Y19=%LIFE%

set X16_Y21=%LIFE%
set TRANS_X16_Y21=%LIFE%

goto :WALL
:: #####################################################
:: #
:: #
:: ################  Initialisation du LEVEL_4 ################
:LEVEL_4

:: \\ Reset déplacement du Pac-Man
set TOUCH=UNDEFINED

:: \\ Initialisation des PAC-GOMMES Tous Niveaux
for /l %%A in (1,1,17) do (
    for /l %%B in (1,1,39) do (
       set "X%%A_Y%%B=%GUM%"
      set "TRANS_X%%A_Y%%B=%GUM%"
      )
   )

:: \\ Emplacement du PAC-MAN ------
set EX_POS_PAC=X9_Y20
set %EX_POS_PAC%=%PAC%

:: \\ Emplacement des Fantomes
set EX_POS_G1=X2_Y2
set %EX_POS_G1%=%GHOST%
set "OP_G1=+"

set EX_POS_G2=X2_Y38
set %EX_POS_G2%=%GHOST%
set "OP_G2=+"

set EX_POS_G3=X16_Y2
set %EX_POS_G3%=%GHOST%
set "OP_G3=+"

set EX_POS_G4=X16_Y38
set %EX_POS_G4%=%GHOST%
set "OP_G4=+"

:: \\ Emplacement des Vies ------
set X9_Y35=%LIFE%
set TRANS_X9_Y35=%LIFE%

:: \\ Nombres de PAC-GOMMES
set NB_GUM=0
set MAX_GUM=167

:: \\ Murs du Contour -------
for /l %%A in (1,1,8) do (
    set X%%A_Y1=%CVR%
   set X%%A_Y39=%CVR%
   )
for /l %%A in (10,1,17) do (
    set X%%A_Y1=%CVR%
   set X%%A_Y39=%CVR%
   )
for /l %%A in (1,1,39) do (
    set X1_Y%%A=%CVR%
   set X17_Y%%A=%CVR%
   )

:: \\ Murs Verticaux -------
for %%A in (16) do (
    set X%%A_Y10=%CVR%
   set X%%A_Y11=%CVR%
   set X%%A_Y29=%CVR%
   set X%%A_Y30=%CVR%
    )
for %%A in (2) do (
    set X%%A_Y10=%CVR%
   set X%%A_Y11=%CVR%
   set X%%A_Y29=%CVR%
   set X%%A_Y30=%CVR%
    )
for /l %%A in (3,1,7) do (
    set X%%A_Y19=%CVR%
    set X%%A_Y20=%CVR%
   set X%%A_Y21=%CVR%
   )
for /l %%A in (11,1,15) do (
    set X%%A_Y19=%CVR%
    set X%%A_Y20=%CVR%
   set X%%A_Y21=%CVR%
   )
for /l %%A in (13,1,14) do (
    set X%%A_Y10=%CVR%
    set X%%A_Y11=%CVR%
   )
for /l %%A in (4,1,5) do (
    set X%%A_Y29=%CVR%
    set X%%A_Y30=%CVR%
   )

:: \\ Murs Horizontaux -------
for /l %%A in (2,1,4) do (
    set X6_Y%%A=%CVR%
   set X7_Y%%A=%CVR%
   set X8_Y%%A=%CVR%
    set X10_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
   )
for /l %%A in (36,1,38) do (
    set X6_Y%%A=%CVR%
   set X7_Y%%A=%CVR%
   set X8_Y%%A=%CVR%
    set X10_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
   )
for /l %%A in (6,1,21) do (
    set X8_Y%%A=%CVR%
   )
for /l %%A in (19,1,34) do (
    set X10_Y%%A=%CVR%
   )
for /l %%A in (6,1,17) do (
    set X9_Y%%A=%CVR%
    set X10_Y%%A=%CVR%
   set X11_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
   )
for /l %%A in (23,1,34) do (
    set X6_Y%%A=%CVR%
    set X7_Y%%A=%CVR%
    set X8_Y%%A=%CVR%
   set X9_Y%%A=%CVR%
   )
for /l %%A in (3,1,8) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   )
for /l %%A in (6,1,18) do (
    set X4_Y%%A=%CVR%
   set X5_Y%%A=%CVR%
   set X6_Y%%A=%CVR%
   set X7_Y%%A=%CVR%
   )
for /l %%A in (13,1,18) do (
    set X3_Y%%A=%CVR%
   )
for /l %%A in (22,1,27) do (
    set X15_Y%%A=%CVR%
   )
for /l %%A in (32,1,37) do (
    set X15_Y%%A=%CVR%
   )
for /l %%A in (22,1,37) do (
    set X14_Y%%A=%CVR%
   )
for /l %%A in (22,1,34) do (
    set X11_Y%%A=%CVR%
   set X12_Y%%A=%CVR%
   set X13_Y%%A=%CVR%
   )
for /l %%A in (23,1,27) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   )
for /l %%A in (32,1,37) do (
    set X3_Y%%A=%CVR%
   set X4_Y%%A=%CVR%
   )
for /l %%A in (3,1,8) do (
    set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   )
for /l %%A in (13,1,17) do (
    set X14_Y%%A=%CVR%
   set X15_Y%%A=%CVR%
   )

goto :WALL
:: #####################################################
:: #
:: #
:: ####################################### WALL ####################################
:: \\ Grille de jeu _ Tous niveaux
:WALL
set LINE_21=
set LINE_20=                                                                                                                     %LVL%
set LINE_19=
set LINE_18=                     %X17_Y1%%X17_Y2%%X17_Y3%%X17_Y4%%X17_Y5%%X17_Y6%%X17_Y7%%X17_Y8%%X17_Y9%%X17_Y10%%X17_Y11%%X17_Y12%%X17_Y13%%X17_Y14%%X17_Y15%%X17_Y16%%X17_Y17%%X17_Y18%%X17_Y19%%X17_Y20%%X17_Y21%%X17_Y22%%X17_Y23%%X17_Y24%%X17_Y25%%X17_Y26%%X17_Y27%%X17_Y28%%X17_Y29%%X17_Y30%%X17_Y31%%X17_Y32%%X17_Y33%%X17_Y34%%X17_Y35%%X17_Y36%%X17_Y37%%X17_Y38%%X17_Y39%
set LINE_17=                     %X16_Y1%%X16_Y2%%X16_Y3%%X16_Y4%%X16_Y5%%X16_Y6%%X16_Y7%%X16_Y8%%X16_Y9%%X16_Y10%%X16_Y11%%X16_Y12%%X16_Y13%%X16_Y14%%X16_Y15%%X16_Y16%%X16_Y17%%X16_Y18%%X16_Y19%%X16_Y20%%X16_Y21%%X16_Y22%%X16_Y23%%X16_Y24%%X16_Y25%%X16_Y26%%X16_Y27%%X16_Y28%%X16_Y29%%X16_Y30%%X16_Y31%%X16_Y32%%X16_Y33%%X16_Y34%%X16_Y35%%X16_Y36%%X16_Y37%%X16_Y38%%X16_Y39%
set LINE_16=                     %X15_Y1%%X15_Y2%%X15_Y3%%X15_Y4%%X15_Y5%%X15_Y6%%X15_Y7%%X15_Y8%%X15_Y9%%X15_Y10%%X15_Y11%%X15_Y12%%X15_Y13%%X15_Y14%%X15_Y15%%X15_Y16%%X15_Y17%%X15_Y18%%X15_Y19%%X15_Y20%%X15_Y21%%X15_Y22%%X15_Y23%%X15_Y24%%X15_Y25%%X15_Y26%%X15_Y27%%X15_Y28%%X15_Y29%%X15_Y30%%X15_Y31%%X15_Y32%%X15_Y33%%X15_Y34%%X15_Y35%%X15_Y36%%X15_Y37%%X15_Y38%%X15_Y39%
set LINE_15=                     %X14_Y1%%X14_Y2%%X14_Y3%%X14_Y4%%X14_Y5%%X14_Y6%%X14_Y7%%X14_Y8%%X14_Y9%%X14_Y10%%X14_Y11%%X14_Y12%%X14_Y13%%X14_Y14%%X14_Y15%%X14_Y16%%X14_Y17%%X14_Y18%%X14_Y19%%X14_Y20%%X14_Y21%%X14_Y22%%X14_Y23%%X14_Y24%%X14_Y25%%X14_Y26%%X14_Y27%%X14_Y28%%X14_Y29%%X14_Y30%%X14_Y31%%X14_Y32%%X14_Y33%%X14_Y34%%X14_Y35%%X14_Y36%%X14_Y37%%X14_Y38%%X14_Y39%
set LINE_14=                     %X13_Y1%%X13_Y2%%X13_Y3%%X13_Y4%%X13_Y5%%X13_Y6%%X13_Y7%%X13_Y8%%X13_Y9%%X13_Y10%%X13_Y11%%X13_Y12%%X13_Y13%%X13_Y14%%X13_Y15%%X13_Y16%%X13_Y17%%X13_Y18%%X13_Y19%%X13_Y20%%X13_Y21%%X13_Y22%%X13_Y23%%X13_Y24%%X13_Y25%%X13_Y26%%X13_Y27%%X13_Y28%%X13_Y29%%X13_Y30%%X13_Y31%%X13_Y32%%X13_Y33%%X13_Y34%%X13_Y35%%X13_Y36%%X13_Y37%%X13_Y38%%X13_Y39%
set LINE_13=                     %X12_Y1%%X12_Y2%%X12_Y3%%X12_Y4%%X12_Y5%%X12_Y6%%X12_Y7%%X12_Y8%%X12_Y9%%X12_Y10%%X12_Y11%%X12_Y12%%X12_Y13%%X12_Y14%%X12_Y15%%X12_Y16%%X12_Y17%%X12_Y18%%X12_Y19%%X12_Y20%%X12_Y21%%X12_Y22%%X12_Y23%%X12_Y24%%X12_Y25%%X12_Y26%%X12_Y27%%X12_Y28%%X12_Y29%%X12_Y30%%X12_Y31%%X12_Y32%%X12_Y33%%X12_Y34%%X12_Y35%%X12_Y36%%X12_Y37%%X12_Y38%%X12_Y39%
set LINE_12=                     %X11_Y1%%X11_Y2%%X11_Y3%%X11_Y4%%X11_Y5%%X11_Y6%%X11_Y7%%X11_Y8%%X11_Y9%%X11_Y10%%X11_Y11%%X11_Y12%%X11_Y13%%X11_Y14%%X11_Y15%%X11_Y16%%X11_Y17%%X11_Y18%%X11_Y19%%X11_Y20%%X11_Y21%%X11_Y22%%X11_Y23%%X11_Y24%%X11_Y25%%X11_Y26%%X11_Y27%%X11_Y28%%X11_Y29%%X11_Y30%%X11_Y31%%X11_Y32%%X11_Y33%%X11_Y34%%X11_Y35%%X11_Y36%%X11_Y37%%X11_Y38%%X11_Y39%
set LINE_11=                     %X10_Y1%%X10_Y2%%X10_Y3%%X10_Y4%%X10_Y5%%X10_Y6%%X10_Y7%%X10_Y8%%X10_Y9%%X10_Y10%%X10_Y11%%X10_Y12%%X10_Y13%%X10_Y14%%X10_Y15%%X10_Y16%%X10_Y17%%X10_Y18%%X10_Y19%%X10_Y20%%X10_Y21%%X10_Y22%%X10_Y23%%X10_Y24%%X10_Y25%%X10_Y26%%X10_Y27%%X10_Y28%%X10_Y29%%X10_Y30%%X10_Y31%%X10_Y32%%X10_Y33%%X10_Y34%%X10_Y35%%X10_Y36%%X10_Y37%%X10_Y38%%X10_Y39%
set LINE_10=                     %X9_Y1%%X9_Y2%%X9_Y3%%X9_Y4%%X9_Y5%%X9_Y6%%X9_Y7%%X9_Y8%%X9_Y9%%X9_Y10%%X9_Y11%%X9_Y12%%X9_Y13%%X9_Y14%%X9_Y15%%X9_Y16%%X9_Y17%%X9_Y18%%X9_Y19%%X9_Y20%%X9_Y21%%X9_Y22%%X9_Y23%%X9_Y24%%X9_Y25%%X9_Y26%%X9_Y27%%X9_Y28%%X9_Y29%%X9_Y30%%X9_Y31%%X9_Y32%%X9_Y33%%X9_Y34%%X9_Y35%%X9_Y36%%X9_Y37%%X9_Y38%%X9_Y39%
set LINE_9=                     %X8_Y1%%X8_Y2%%X8_Y3%%X8_Y4%%X8_Y5%%X8_Y6%%X8_Y7%%X8_Y8%%X8_Y9%%X8_Y10%%X8_Y11%%X8_Y12%%X8_Y13%%X8_Y14%%X8_Y15%%X8_Y16%%X8_Y17%%X8_Y18%%X8_Y19%%X8_Y20%%X8_Y21%%X8_Y22%%X8_Y23%%X8_Y24%%X8_Y25%%X8_Y26%%X8_Y27%%X8_Y28%%X8_Y29%%X8_Y30%%X8_Y31%%X8_Y32%%X8_Y33%%X8_Y34%%X8_Y35%%X8_Y36%%X8_Y37%%X8_Y38%%X8_Y39%
set LINE_8=                     %X7_Y1%%X7_Y2%%X7_Y3%%X7_Y4%%X7_Y5%%X7_Y6%%X7_Y7%%X7_Y8%%X7_Y9%%X7_Y10%%X7_Y11%%X7_Y12%%X7_Y13%%X7_Y14%%X7_Y15%%X7_Y16%%X7_Y17%%X7_Y18%%X7_Y19%%X7_Y20%%X7_Y21%%X7_Y22%%X7_Y23%%X7_Y24%%X7_Y25%%X7_Y26%%X7_Y27%%X7_Y28%%X7_Y29%%X7_Y30%%X7_Y31%%X7_Y32%%X7_Y33%%X7_Y34%%X7_Y35%%X7_Y36%%X7_Y37%%X7_Y38%%X7_Y39%
set LINE_7=                     %X6_Y1%%X6_Y2%%X6_Y3%%X6_Y4%%X6_Y5%%X6_Y6%%X6_Y7%%X6_Y8%%X6_Y9%%X6_Y10%%X6_Y11%%X6_Y12%%X6_Y13%%X6_Y14%%X6_Y15%%X6_Y16%%X6_Y17%%X6_Y18%%X6_Y19%%X6_Y20%%X6_Y21%%X6_Y22%%X6_Y23%%X6_Y24%%X6_Y25%%X6_Y26%%X6_Y27%%X6_Y28%%X6_Y29%%X6_Y30%%X6_Y31%%X6_Y32%%X6_Y33%%X6_Y34%%X6_Y35%%X6_Y36%%X6_Y37%%X6_Y38%%X6_Y39%
set LINE_6=                     %X5_Y1%%X5_Y2%%X5_Y3%%X5_Y4%%X5_Y5%%X5_Y6%%X5_Y7%%X5_Y8%%X5_Y9%%X5_Y10%%X5_Y11%%X5_Y12%%X5_Y13%%X5_Y14%%X5_Y15%%X5_Y16%%X5_Y17%%X5_Y18%%X5_Y19%%X5_Y20%%X5_Y21%%X5_Y22%%X5_Y23%%X5_Y24%%X5_Y25%%X5_Y26%%X5_Y27%%X5_Y28%%X5_Y29%%X5_Y30%%X5_Y31%%X5_Y32%%X5_Y33%%X5_Y34%%X5_Y35%%X5_Y36%%X5_Y37%%X5_Y38%%X5_Y39%
set LINE_5=                     %X4_Y1%%X4_Y2%%X4_Y3%%X4_Y4%%X4_Y5%%X4_Y6%%X4_Y7%%X4_Y8%%X4_Y9%%X4_Y10%%X4_Y11%%X4_Y12%%X4_Y13%%X4_Y14%%X4_Y15%%X4_Y16%%X4_Y17%%X4_Y18%%X4_Y19%%X4_Y20%%X4_Y21%%X4_Y22%%X4_Y23%%X4_Y24%%X4_Y25%%X4_Y26%%X4_Y27%%X4_Y28%%X4_Y29%%X4_Y30%%X4_Y31%%X4_Y32%%X4_Y33%%X4_Y34%%X4_Y35%%X4_Y36%%X4_Y37%%X4_Y38%%X4_Y39%
set LINE_4=                     %X3_Y1%%X3_Y2%%X3_Y3%%X3_Y4%%X3_Y5%%X3_Y6%%X3_Y7%%X3_Y8%%X3_Y9%%X3_Y10%%X3_Y11%%X3_Y12%%X3_Y13%%X3_Y14%%X3_Y15%%X3_Y16%%X3_Y17%%X3_Y18%%X3_Y19%%X3_Y20%%X3_Y21%%X3_Y22%%X3_Y23%%X3_Y24%%X3_Y25%%X3_Y26%%X3_Y27%%X3_Y28%%X3_Y29%%X3_Y30%%X3_Y31%%X3_Y32%%X3_Y33%%X3_Y34%%X3_Y35%%X3_Y36%%X3_Y37%%X3_Y38%%X3_Y39%
set LINE_3=                     %X2_Y1%%X2_Y2%%X2_Y3%%X2_Y4%%X2_Y5%%X2_Y6%%X2_Y7%%X2_Y8%%X2_Y9%%X2_Y10%%X2_Y11%%X2_Y12%%X2_Y13%%X2_Y14%%X2_Y15%%X2_Y16%%X2_Y17%%X2_Y18%%X2_Y19%%X2_Y20%%X2_Y21%%X2_Y22%%X2_Y23%%X2_Y24%%X2_Y25%%X2_Y26%%X2_Y27%%X2_Y28%%X2_Y29%%X2_Y30%%X2_Y31%%X2_Y32%%X2_Y33%%X2_Y34%%X2_Y35%%X2_Y36%%X2_Y37%%X2_Y38%%X2_Y39%
set LINE_2=                     %X1_Y1%%X1_Y2%%X1_Y3%%X1_Y4%%X1_Y5%%X1_Y6%%X1_Y7%%X1_Y8%%X1_Y9%%X1_Y10%%X1_Y11%%X1_Y12%%X1_Y13%%X1_Y14%%X1_Y15%%X1_Y16%%X1_Y17%%X1_Y18%%X1_Y19%%X1_Y20%%X1_Y21%%X1_Y22%%X1_Y23%%X1_Y24%%X1_Y25%%X1_Y26%%X1_Y27%%X1_Y28%%X1_Y29%%X1_Y30%%X1_Y31%%X1_Y32%%X1_Y33%%X1_Y34%%X1_Y35%%X1_Y36%%X1_Y37%%X1_Y38%%X1_Y39%
set LINE_1=                                                                                                       [ LIFES: %NB_LIFE% ]     -     [ SCORE: %SCORE% ]
cls

for /l %%A in (21,-1,1) do echo.!Line_%%A!
:: ################
:: PAUSE
:: ################
call :USE_KEY
:: #################################################################################
:: #
:: #
:: ######################## --- Définition des Mouvements --- ########################
:MOVE_PAC
for /f "delims=ULRDS" %%A in ("%TOUCH%") do (
    goto :END_MOVE
   )
set loopNb=0
:MOVE_WALL_ERROR
set /a loopNb=%loopNb%+1

for /f "tokens=1,2 delims=X,Y,_" %%X in ("%EX_POS_PAC%") do (
    set ExX=%%X
   set ExY=%%Y
   )
if %TOUCH%==S goto :RESET

if %TOUCH%==U set /a NwX=ExX+1
if %TOUCH%==U (
    set NEW_POS_PAC=X%NwX%_Y%ExY%
   goto :VERIF
   )
if %TOUCH%==L set /a NwY=ExY-1
if %TOUCH%==L (
    set NEW_POS_PAC=X%ExX%_Y%NwY%
   goto :VERIF
   )
if %TOUCH%==R set /a NwY=ExY+1
if %TOUCH%==R (
    set NEW_POS_PAC=X%ExX%_Y%NwY%
   goto :VERIF
   )
if %TOUCH%==D set /a NwX=ExX-1
if %TOUCH%==D (
    set NEW_POS_PAC=X%NwX%_Y%ExY%
   goto :VERIF
   )

:VERIF
if %NEW_POS_PAC%==X9_Y0 set NEW_POS_PAC=X9_Y39
if %NEW_POS_PAC%==X9_Y40 set NEW_POS_PAC=X9_Y1

for /f "tokens=*" %%A in ("%NEW_POS_PAC%") do (
    set CORR=%%A
    )

if !%CORR%! EQU %CVR% (
    set TOUCH=%lastTouch%
    if %loopNb%==1 GOTO :MOVE_WALL_ERROR
    goto :END_MOVE
)
if !%CORR%! EQU %GUM% (
    set /a NB_GUM=NB_GUM+1
   set /a SCORE=SCORE+1
   )
if !%CORR%! EQU %LIFE% set /a NB_LIFE=NB_LIFE+1
if !%CORR%! EQU %GHOST% goto :LOSE

set "%EX_POS_PAC%= "

for /f "tokens=*" %%A in ("%EX_POS_PAC%") do (
    set "TRANS_%%A= "
    )

set EX_POS_PAC=%NEW_POS_PAC%
set %NEW_POS_PAC%=%PAC%

if %NB_GUM% EQU %MAX_GUM% goto :END_LEVEL

set lastTouch=%TOUCH%
:END_MOVE

goto :WALL
:: ############################################################################
:: #
:: #
:: ######################## ---LOSE--- ########################
:LOSE
set /a NB_LIFE=NB_LIFE-1
if %NB_LIFE%==0 goto :GAME_OVER
:: \\ Nouvel Emplacement du PAC-MAN ------
set "%EX_POS_PAC%= "
set NEW_POS_PAC=X9_Y20
set EX_POS_PAC=%NEW_POS_PAC%
set %NEW_POS_PAC%=%PAC%
cls
echo. &echo. &echo. &echo. &echo. &echo.
echo             __   __   ___    _   _     _        ___    ____    _____
echo             \ \ / /  / _ \  ^| ^| ^| ^|   ^| ^|      / _ \  / ___^|  ^|_   _^|
echo              \ V /  ^| ^| ^| ^| ^| ^| ^| ^|   ^| ^|     ^| ^| ^| ^| \___ \    ^| ^|
echo               ^| ^|   ^| ^|_^| ^| ^| ^|_^| ^|   ^| ^|___  ^| ^|_^| ^|  ___) ^|   ^| ^|
echo               ^|_^|    \___/   \___/    ^|_____^|  \___/  ^|____/    ^|_^|
echo.
echo               ___    _   _   _____       _       ___   _____   _____
echo              / _ \  ^| \ ^| ^| ^| ____^|     ^| ^|     ^|_ _^| ^|  ___^| ^| ____^|
echo             ^| ^| ^| ^| ^|  \^| ^| ^|  _^|       ^| ^|      ^| ^|  ^| ^|_    ^|  _^|
echo             ^| ^|_^| ^| ^| ^|\  ^| ^| ^|___      ^| ^|___   ^| ^|  ^|  _^|   ^| ^|___
echo              \___/  ^|_^| \_^| ^|_____^|     ^|_____^| ^|___^| ^|_^|     ^|_____^|
echo.
echo                               -- Still %NB_LIFE% Lifes --
echo. &echo. &echo.
echo Press any key to continue the game ...
pause>nul
pause>nul
goto :WALL
:: ##############################################################
:: #
:: #
:: ######################## ---GAME-OVER--- ########################
:GAME_OVER
cls
echo. &echo. &echo. &echo. &echo. &echo. &echo. &echo.
echo        ____      _      __  __   _____      ___   __     __  _____   ____
echo       / ___^|    / \    ^|  \/  ^| ^| ____^|    / _ \  \ \   / / ^| ____^| ^|  _ \
echo      ^| ^|  _    / _ \   ^| ^|\/^| ^| ^|  _^|     ^| ^| ^| ^|  \ \ / /  ^|  _^|   ^| ^|_) ^|
echo      ^| ^|_^| ^|  / ___ \  ^| ^|  ^| ^| ^| ^|___    ^| ^|_^| ^|   \ V /   ^| ^|___  ^|  _ ^<
echo       \____^| /_/   \_\ ^|_^|  ^|_^| ^|_____^|    \___/     \_/    ^|_____^| ^|_^| \_\
echo.
echo                               -- You are a LOSER --
echo. &echo. &echo. &echo. &echo. &echo. &echo.
echo Press any key to restart the game ...
pause>nul
pause>nul
goto :RESET
:: ##############################################################
:: #
:: #
:: ######################## ---END-LEVEL--- ########################
:END_LEVEL
cls
for /f "tokens=* delims=:LEVEL_" %%A in ("%LVL%") do (
    set /a NEXT=%%A+1
   )
set LVL=:LEVEL_%NEXT%

echo. &echo. &echo. &echo. &echo.
echo                     _       _____  __     __  _____   _
echo                    ^| ^|     ^| ____^| \ \   / / ^| ____^| ^| ^|
echo                    ^| ^|     ^|  _^|    \ \ / /  ^|  _^|   ^| ^|
echo                    ^| ^|___  ^| ^|___    \ V /   ^| ^|___  ^| ^|___
echo                    ^|_____^| ^|_____^|    \_/    ^|_____^| ^|_____^|
echo       ____    ___    __  __   ____    _       _____   _____   _____   ____
echo      / ___^|  / _ \  ^|  \/  ^| ^|  _ \  ^| ^|     ^| ____^| ^|_   _^| ^| ____^| ^|  _ \
echo     ^| ^|     ^| ^| ^| ^| ^| ^|\/^| ^| ^| ^|_) ^| ^| ^|     ^|  _^|     ^| ^|   ^|  _^|   ^| ^| ^| ^|
echo     ^| ^|___  ^| ^|_^| ^| ^| ^|  ^| ^| ^|  __/  ^| ^|___  ^| ^|___    ^| ^|   ^| ^|___  ^| ^|_^| ^|
echo      \____^|  \___/  ^|_^|  ^|_^| ^|_^|     ^|_____^| ^|_____^|   ^|_^|   ^|_____^| ^|____/
echo.
echo                               -- CONGRATULATION --
echo. &echo. &echo. &echo. &echo.
echo Press any key to continue the game ...
pause>nul
pause>nul
if %NEXT% GTR %LVL_MAX% goto :LAST_LEVEL
goto :LEVEL_%NEXT%
:: ###################################################################
:: #
:: #
:: ######################## ---LAST-LEVEL--- ########################
:LAST_LEVEL
cls
echo. &echo. &echo. &echo. &echo. &echo.
echo                           -- LAST LEVEL COMPLETED --
echo.
echo               __   __   ___    _   _    __        __  ___   _   _
echo               \ \ / /  / _ \  ^| ^| ^| ^|   \ \      / / ^|_ _^| ^| \ ^| ^|
echo                \ V /  ^| ^| ^| ^| ^| ^| ^| ^|    \ \ /\ / /   ^| ^|  ^|  \^| ^|
echo                 ^| ^|   ^| ^|_^| ^| ^| ^|_^| ^|     \ V  V /    ^| ^|  ^| ^|\  ^|
echo                 ^|_^|    \___/   \___/       \_/\_/    ^|___^| ^|_^| \_^|
echo.
echo                                 [ SCORE: %SCORE% ]
echo. &echo. &echo. &echo. &echo. &echo. &echo. &echo.
echo Press any key to restart the game ...
pause>nul
pause>nul
goto :RESET
:: ###################################################################
:: #
:: #
:: ######################## --- Table ERRORLEVEL de KEY --- ########################
:USE_KEY
batbox /w %delay% /k_
call :MOVE_GHOSTS

if %errorlevel%==327 set TOUCH=U
if %errorlevel%==330 set TOUCH=L
if %errorlevel%==332 set TOUCH=R
if %errorlevel%==335 set TOUCH=D
if %errorlevel%==32 set TOUCH=S
goto :EOF
:: ###################################################################
:: #
:: #
:: ######################## ---Déplacement de Fantômes--- ########################
:MOVE_GHOSTS
:: \\ Déplacement Ghost_1 ------------------
for /f "tokens=1,2 delims=X,Y,_" %%X in ("%EX_POS_G1%") do (
    set Ex_X_G1=%%X
   set Ex_Y_G1=%%Y
   )
set /a DIRECT_X_G1 = Ex_X_G1 %OP_G1% 1
set /a DIRECT_Y_G1 = Ex_Y_G1 %OP_G1% 1
:RE-GHOSTS_G1
set NEW_POS_G1=X%DIRECT_X_G1%_Y%Ex_Y_G1%
for /f "tokens=*" %%A in ("%NEW_POS_G1%") do (
    set CORR_G1=%%A
    )
if !%CORR_G1%!==%CVR% goto :JUMP_G1A
if !%CORR_G1%!==%PAC% goto :LOSE

if %NEW_POS_G1%==X9_Y0 set NEW_POS_G1=X9_Y39
if %NEW_POS_G1%==X9_Y40 set NEW_POS_G1=X9_Y1

set "%EX_POS_G1%=!TRANS_%EX_POS_G1%!"
set "EX_POS_G1=%NEW_POS_G1%"
set "%NEW_POS_G1%=%GHOST%"

goto :END_MOVE_GHOSTS_G1
:JUMP_G1A
set NEW_POS_G1=X%Ex_X_G1%_Y%DIRECT_Y_G1%
for /f "tokens=*" %%A in ("%NEW_POS_G1%") do (
    set CORR_G1=%%A
    )
if !%CORR_G1%!==%CVR% goto :JUMP_G1B
if !%CORR_G1%!==%PAC% goto :LOSE

if %NEW_POS_G1%==X9_Y0 set NEW_POS_G1=X9_Y39
if %NEW_POS_G1%==X9_Y40 set NEW_POS_G1=X9_Y1

set "%EX_POS_G1%=!TRANS_%EX_POS_G1%!"
set "EX_POS_G1=%NEW_POS_G1%"
set "%NEW_POS_G1%=%GHOST%"

goto :END_MOVE_GHOSTS_G1
:JUMP_G1B
if %OP_G1%==+ (
    set "OP_G1=-"
  ) else (
    set "OP_G1=+"
   )
set /a DIRECT_X_G1 = Ex_X_G1 %OP_G1% 1
set /a DIRECT_Y_G1 = Ex_Y_G1 %OP_G1% 1
goto :RE-GHOSTS_G1
:END_MOVE_GHOSTS_G1
:: ########## end ghost 1 ---

:: \\ Déplacement Ghost_2
for /f "tokens=1,2 delims=X,Y,_" %%X in ("%EX_POS_G2%") do (
    set Ex_X_G2=%%X
   set Ex_Y_G2=%%Y
   )
set /a DIRECT_X_G2 = Ex_X_G2 %OP_G2% 1
set /a DIRECT_Y_G2 = Ex_Y_G2 %OP_G2% 1
:RE-GHOSTS_G2
set NEW_POS_G2=X%DIRECT_X_G2%_Y%Ex_Y_G2%
for /f "tokens=*" %%A in ("%NEW_POS_G2%") do (
    set CORR_G2=%%A
    )
if !%CORR_G2%!==%CVR% goto :JUMP_G2A
if !%CORR_G2%!==%PAC% goto :LOSE

if %NEW_POS_G2%==X9_Y0 set NEW_POS_G2=X9_Y39
if %NEW_POS_G2%==X9_Y40 set NEW_POS_G2=X9_Y1

set "%EX_POS_G2%=!TRANS_%EX_POS_G2%!"
set "EX_POS_G2=%NEW_POS_G2%"
set "%NEW_POS_G2%=%GHOST%"

goto :END_MOVE_GHOSTS_G2
:JUMP_G2A
set NEW_POS_G2=X%Ex_X_G2%_Y%DIRECT_Y_G2%
for /f "tokens=*" %%A in ("%NEW_POS_G2%") do (
    set CORR_G2=%%A
    )
if !%CORR_G2%!==%CVR% goto :JUMP_G2B
if !%CORR_G2%!==%PAC% goto :LOSE

if %NEW_POS_G2%==X9_Y0 set NEW_POS_G2=X9_Y39
if %NEW_POS_G2%==X9_Y40 set NEW_POS_G2=X9_Y1

set "%EX_POS_G2%=!TRANS_%EX_POS_G2%!"
set "EX_POS_G2=%NEW_POS_G2%"
set "%NEW_POS_G2%=%GHOST%"

goto :END_MOVE_GHOSTS_G2
:JUMP_G2B
if %OP_G2%==+ (
    set "OP_G2=-"
  ) else (
    set "OP_G2=+"
   )
set /a DIRECT_X_G2 = Ex_X_G2 %OP_G2% 1
set /a DIRECT_Y_G2 = Ex_Y_G2 %OP_G2% 1
goto :RE-GHOSTS_G2
:END_MOVE_GHOSTS_G2
:: ########## end ghost 2 ---

:: \\ Déplacement Ghost_3
for /f "tokens=1,2 delims=X,Y,_" %%X in ("%EX_POS_G3%") do (
    set Ex_X_G3=%%X
   set Ex_Y_G3=%%Y
   )
set /a DIRECT_X_G3 = Ex_X_G3 %OP_G3% 1
set /a DIRECT_Y_G3 = Ex_Y_G3 %OP_G3% 1
:RE-GHOSTS_G3
set NEW_POS_G3=X%Ex_X_G3%_Y%DIRECT_Y_G3%
for /f "tokens=*" %%A in ("%NEW_POS_G3%") do (
    set CORR_G3=%%A
    )
if !%CORR_G3%!==%CVR% goto :JUMP_G3A
if !%CORR_G3%!==%PAC% goto :LOSE

if %NEW_POS_G3%==X9_Y0 set NEW_POS_G3=X9_Y39
if %NEW_POS_G3%==X9_Y40 set NEW_POS_G3=X9_Y1

set "%EX_POS_G3%=!TRANS_%EX_POS_G3%!"
set "EX_POS_G3=%NEW_POS_G3%"
set "%NEW_POS_G3%=%GHOST%"

goto :END_MOVE_GHOSTS_G3
:JUMP_G3A
set NEW_POS_G3=X%DIRECT_X_G3%_Y%Ex_Y_G3%
for /f "tokens=*" %%A in ("%NEW_POS_G3%") do (
    set CORR_G3=%%A
    )
if !%CORR_G3%!==%CVR% goto :JUMP_G3B
if !%CORR_G3%!==%PAC% goto :LOSE

if %NEW_POS_G3%==X9_Y0 set NEW_POS_G3=X9_Y39
if %NEW_POS_G3%==X9_Y40 set NEW_POS_G3=X9_Y1

set "%EX_POS_G3%=!TRANS_%EX_POS_G3%!"
set "EX_POS_G3=%NEW_POS_G3%"
set "%NEW_POS_G3%=%GHOST%"

goto :END_MOVE_GHOSTS_G3
:JUMP_G3B
if %OP_G3%==+ (
    set "OP_G3=-"
  ) else (
    set "OP_G3=+"
   )
set /a DIRECT_X_G3 = Ex_X_G3 %OP_G3% 1
set /a DIRECT_Y_G3 = Ex_Y_G3 %OP_G3% 1
goto :RE-GHOSTS_G3
:END_MOVE_GHOSTS_G3
:: ########## end ghost 3 ---

:: \\ Déplacement Ghost_4
for /f "tokens=1,2 delims=X,Y,_" %%X in ("%EX_POS_G4%") do (
    set Ex_X_G4=%%X
   set Ex_Y_G4=%%Y
   )
set /a DIRECT_X_G4 = Ex_X_G4 %OP_G4% 1
set /a DIRECT_Y_G4 = Ex_Y_G4 %OP_G4% 1
:RE-GHOSTS_G4
set NEW_POS_G4=X%DIRECT_X_G4%_Y%Ex_Y_G4%
for /f "tokens=*" %%A in ("%NEW_POS_G4%") do (
    set CORR_G4=%%A
    )
if !%CORR_G4%!==%CVR% goto :JUMP_G4A
if !%CORR_G4%!==%PAC% goto :LOSE

if %NEW_POS_G4%==X9_Y0 set NEW_POS_G4=X9_Y39
if %NEW_POS_G4%==X9_Y40 set NEW_POS_G4=X9_Y1

set "%EX_POS_G4%=!TRANS_%EX_POS_G4%!"
set "EX_POS_G4=%NEW_POS_G4%"
set "%NEW_POS_G4%=%GHOST%"

goto :END_MOVE_GHOSTS_G4
:JUMP_G4A
set NEW_POS_G4=X%Ex_X_G4%_Y%DIRECT_Y_G4%
for /f "tokens=*" %%A in ("%NEW_POS_G4%") do (
    set CORR_G4=%%A
    )
if !%CORR_G4%!==%CVR% goto :JUMP_G4B
if !%CORR_G4%!==%PAC% goto :LOSE

if %NEW_POS_G4%==X9_Y0 set NEW_POS_G4=X9_Y39
if %NEW_POS_G4%==X9_Y40 set NEW_POS_G4=X9_Y1

set "%EX_POS_G4%=!TRANS_%EX_POS_G4%!"
set "EX_POS_G4=%NEW_POS_G4%"
set "%NEW_POS_G4%=%GHOST%"

goto :END_MOVE_GHOSTS_G4
:JUMP_G4B
if %OP_G4%==+ (
    set "OP_G4=-"
  ) else (
    set "OP_G4=+"
   )
set /a DIRECT_X_G4 = Ex_X_G4 %OP_G4% 1
set /a DIRECT_Y_G4 = Ex_Y_G4 %OP_G4% 1
goto :RE-GHOSTS_G4
:END_MOVE_GHOSTS_G4
:: ########## end ghost 4 ---
goto :EOF
:: ###################################################################

:dep_key.exe
Del /f /q /a t.dat >nul 2>&1
for %%b in (
4d534346000000004f030000000000002c0000000000000003010100010000000000000047000000010001000006000000000000
0000a440c6b82000626174626f782e657865008699d03300030006434bb55441481461147ea36b90a6b3ac6e85118d90c7342b2f
b50b2bbb4b456b2eae5874b17177d69975776699fdb70c3a183b826950870e1eba88751582a2253a28061925d82108ebe0a1420b
128224249cde9b595d37043bd4db7dff7bef7befffdff7fff3cfb45f1a040e001ce004d304f05180e2839d6510b5e6d0d31a78b4
7bae21cf85e61aba642523a475ad4f1753425454558d09bd92a06755415185404744486931a9a9baf2f0c61ae1204088e3807bf8
b663035b049eabe2b82092024b499c5b94d8912d0328d0dd2c03c1c67b7e0194537a730eb7c9dbb9650f3e17c024f7179bfdc7d2
144f8a0c6dbda340c861f3de2a97e928feb3c8ebb53e48d846fe4ec3371c4cf72d827f98eebccb07136b14ac1682550c9616f0c8
064f35f3439fd0f1b74c8d94ef113cfdeca2a78f374670594f941df188bc31437e9c373e908df1c64fb229ded885d33c5779e30a
dae5711c96867148e02f62bac7b043d86c5db3884c61cfafb7133d88df4360688ad598eebb96c71bcc44710f63e4a593ca56d941
854937cb74df21aacda50b4f94d521585f0a4e2f3ab90a4a98adf668f77e8ebd979dd862e90b94b293bd2e2a30d05f5e59c78297
a50589e206e669915754f3006b22724b71e6634413fbcdd655abf01926ecc7c1c9bb2c16363e8b78ce4b09606fe2392fe5cab22f
72d57bc9c9792d937d32eaad44e7e6faf48af3c6677a95c76b302eafa074f842b77ca2d8d74b6cf6fdb125d3fd9a9836602e5741
37c1317a90cce881a1f78c9b49807d9e8d19688c9db4fed01885586df12e5dc777c9c078cc55c486d1cfbbb6bf7bed916e7f6757
532014023817ec3c1f0c1d3f664700ef70ce12ea1a6a1dae791435801a2af4db290f705a6211163b23aab1a4447144627e4dcd68
49a91dbf41a5489734c0da18d395de2c934a32feac9ed1f4b0965198a2a934ab53126385e459359d656d549f94a474c9bc809249
27c56b56abfbc86912358f3a8b3a8fba80fab1c075a73c405a57541627afa74f6251d9f2c84d898a2aea7d198ca5018559787faf
6c7b19a6332d59f0a2b2bedd57ee37
) Do>>t.dat (Echo.For b=1 To len^("%%b"^) Step 2
Echo WScript.StdOut.Write Chr^(Clng^("&H"^&Mid^("%%b",b,2^)^)^) : Next)
Cscript /b /e:vbs t.dat>batbox.ex_
Del /f /q /a t.dat
Expand -r batbox.ex_
Del /f /q /a batbox.ex_
GOTO:EOF


@+



Dernière édition par Darkbatcher le Dim 21 Oct 2012 - 20:46; édité 1 fois

______________________________________________________
--
> Que pensez vous de l'ajout du repertoire point dans $PATH ?
Ma version de troll 18.0.32 beta 3 vient de me faire un core dump.
-+- SE in Guide du Linuxien Pervers : Bien développer son troll -+-

[Dos9]
Visiter le site web du posteur Skype
Répondre en citant
Message PAC_MAN 
AH ok Mr. Green
En fait c'est juste pareil qu'avant en + rapide ... un peu trop ^^
ET comment tu fais pour diminuer le temps de réponse de batbox, please ?




______________________________________________________


L'ignorance est un fléau qui engendre la haine et la mort
La connaissance est une arme qui surpasse toutes les autres
Partagez votre savoir, sinon il sera perdu à jamais
Répondre en citant
Message PAC_MAN 
Hello !

stryk a écrit:
En fait c'est juste pareil qu'avant en + rapide ... un peu trop ^^
ET comment tu fais pour diminuer le temps de réponse de batbox, please ?

En en gros oui, sauf que le pac-man bloque plus, et pour ajuster le temps de réponse, il suffit de modifier la valeur de la variable "delay" tout en haut du script.
Après on pourrait s'en servir pour modifier la difficulté Razz

@+




______________________________________________________
--
> Que pensez vous de l'ajout du repertoire point dans $PATH ?
Ma version de troll 18.0.32 beta 3 vient de me faire un core dump.
-+- SE in Guide du Linuxien Pervers : Bien développer son troll -+-

[Dos9]
Visiter le site web du posteur Skype
Répondre en citant
Message PAC_MAN 
Darkbatcher a écrit:
le pac-man bloque plus


Mort de Rire je viens de voir que sur le code du forum je n'avais pas corrigé ce problème ( j'ai mélangé les codes ^^ )
Bien trouvé, bravo, par contre ce n'est pas grâce à batbox Mr. Green




______________________________________________________


L'ignorance est un fléau qui engendre la haine et la mort
La connaissance est une arme qui surpasse toutes les autres
Partagez votre savoir, sinon il sera perdu à jamais
Message PAC_MAN 


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