Give us your programs, and we'll tell you if they halt!
Bring em on!
Name:
Anonymous2010-06-19 7:16
@echo off
rem Double Dice
title Double Dice!
:S
echo Double Dice!
set money=100
echo.
:1
echo How much do you wager?
set /p wager=You have $%money%:
if /I %wager%==save goto :Score
if /I %wager%==help goto :Help
if /I %wager%==delete goto :Del
if /I %wager%==clear goto :Cls
if %wager% LSS 0 echo You can't wager a negative! &goto :1
if %wager% GTR %money% echo You don't have that money! &goto :1
set /a money="money-wager"
set /a DICE1=%random% %%6 + 1 >nul
echo You rolled a %DICE1%.
set /a DICE2=%random% %%6 + 1 >nul
echo You rolled a %DICE2%
if %DICE1%==%DICE2% goto :WIN!
echo.
if %money%==0 goto :F
goto :1
:F
echo Do you want to play again?(y/n)
set /p input=(y/n):
if /I %input%==y Cls &goto :S
if /I %input%==n goto :GO
goto :F
:WIN!
echo.
echo You Win! Here's your winnings!
echo.
set mem=%wager%
set /a wager="wager*6+wager"
set /a money="money+wager"
set /a wager="wager-mem"
echo You've won $%wager%!
set wager=0
echo.
goto :1
:GO
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
echo GAME OVER
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
ping 127.0.0.1 -n 1 >nul
echo.
echo.
:Score
set /p name=Type your name here:
echo %Name% : $%Money%>>Highscore.data
exit
:Help
echo.
echo Double Dice is a game of chance. If you get the same number twice,
echo the wager that you bet is returned sixfold. Otherwise you get nothing.
echo There are few commands in this program:
echo Save: This enters your profile into the highscore chart
echo Highscore: This loads the highscore if it is present
echo Delete: Removes the Highscore
echo Clear: Clears the screen
echo Help: Returns this information form.
echo.
goto :1