Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- chcp 65001 > nul
- set day=%DATE:~0,2%
- set month=%DATE:~3,2%
- set year=%DATE:~6,4%
- :menu
- echo Menu
- echo J. Jouer une partie
- echo S. Score(s) du Jour
- echo G. Score(s) global
- echo Q. Quitter
- echo.
- choice /c:JSGQ /m "Votre choix :"
- echo.
- if %ERRORLEVEL%==1 goto partie
- if %ERRORLEVEL%==2 goto scores
- if %ERRORLEVEL%==3 goto global
- if %ERRORLEVEL%==4 goto fin
- :scores
- type .\save\score_%day%_%month%_%year%.txt
- pause
- cls
- goto menu
- :partie
- set dateBegin=%TIME%
- set /p user=Quel est votre pseudo :
- set coups=0
- set nbMyst=
- set /a nbMyst=%RANDOM% %%100
- :begin
- set /p input=Choisir un nombre :
- set /a coups=%coups%+1
- if %input%==%nbMyst% (
- IF EXIST .\save (
- goto good
- ) ELSE (
- mkdir save
- )
- :good
- echo %user%,%dateBegin%,%TIME%,%coups% >> .\save\score_%day%_%month%_%year%.txt
- echo Bien joué
- timeout 3 > nul
- cls
- goto menu
- )
- :global
- set /p nom=Veuillez saisir le nom du joueur :
- echo Statistiques de jeu pour %nom%
- set nombre=find /c %nom% .\save\score_*.txt
- for /F "tokens=1,2,3 delims= " %%a in ('find /c /i "%nom%" .\save\score_*.txt') do (
- for /F "tokens=1,2,3 delims=\" %%c in ("%%b") do echo %%e - Nombre de parties :
- )
- pause
- if %input% LSS %nbMyst% (
- echo Le nombre mystère est supérieur.
- goto begin
- )
- if %input% GTR %nbMyst% (
- echo Le nombre mystère est inférieur.
- goto begin
- )
- :fin
- pause > nul
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement