REM Feed the Fish game client echo ------------- Fish Game Update --------------------- SET /a overshoot=(%1 + 5) IF /i "%overshoot%" LEQ "1" SET overshoot=3 SET goes=%2 SET thispick=0 SET numallowed=%4 SET mypick=%3 SET cscore=%5 SET yscore=%6 IF TRICK%mypick%==TRICK0 SET /a mypick=(%random% %% %overshoot%)+1 SET /a numf=(%1 - (%mypick%)) SET /a goes=(%2 + 1) IF TRICK%numf%==TRICK0 SET /a yscore=(%yscore% + 1) IF TRICK%numf%==TRICK0 echo Congratulations! IF TRICK%numf%==TRICK0 echo You fed all the fish in time. IF TRICK%numf%==TRICK0 GOTO nomore IF %goes% GTR %numallowed% SET goes=%4 IF TRICK%goes%==TRICK%4 SET /a cscore=(%cscore% + 1) IF TRICK%goes%==TRICK%4 echo Bad luck! IF TRICK%goes%==TRICK%4 echo You ran out of the %numallowed% goes allowed to feed all the fish. IF TRICK%goes%==TRICK%4 echo There were %numf% fish still to feed. IF TRICK%goes%==TRICK%4 GOTO newgame echo There are %numf% fish still to feed. echo You have had %goes% goes of the %numallowed% goes allowed to feed all the fish. IF %numf% LSS 0 echo Oops ... you have overfed (hit the O key to clear out some of the food!) IF %1 LSS 0 GOTO nomore IF NOT EXIST beep.bat GOTO nomore IF %numf% LSS 0 CALL beep.bat GOTO nomore :newgame SET /a numf=(%random% %% 100)+1 SET goes=0 SET thispick=0 SET /a numallowed=(%random% %% 10)+1 IF TRICK%numallowed%==TRICK0 SET numallowed=2 GOTO finishup :nomore :finishup echo ----------End of Fish Game Update ------------------ index.bat %numf% %goes% %thispick% %numallowed% %cscore% %yscore% exit