Creating a geometrically decaying pause loop
So I am working on creating a batch file game analogious to a "Memory"
game. (ie where the player is presented a list of objects for a short
time, then asked to repeat the pattern)
My problem comes in how to decrease the time the pattern is exposed to the
player as the round # increases.
Here is my current code:
@echo off
set /a y=50
set /a x=1000
:foo
set /a y=%y% + %y%
set /a x= %x% - %y%
echo %y%
echo %x%
ping -n 10 -w %x% 127.0.0.1 > nul
goto foo
When run, the above code does present x and y values that change as
expected, however the wait time is always the same. Why is this and how
can I fix it?
Thank you for your time.
No comments:
Post a Comment