;Stones Cheat Script
;Bill P's how-to-win-at-stones script (Requires WinBatch)
;This script assumes you can take 1, 2, or 3 stones per turn
;(The standard game)
;Armed with this script, you too can win at stones maybe 75% of the time
ScriptTitle="Stones"
StonesLeft=2
MaxTakePerTurn=3
TheMagicNumber=MaxTakePerTurn+1
while StonesLeft>1
StonesLeft="a"
while isint(StonesLeft)==@false
StonesLeft=strtrim(askline(ScriptTitle,"How many stones left?",""))
if isint(StonesLeft)==@false then message(ScriptTitle,"Enter an integer, please, not '%StonesLeft%'.")
endwhile
if StonesLeft==1 then break
MyMove=(StonesLeft-1) mod TheMagicNumber
if MyMove==0 then MyMove=1 ; (More stones left to work with)
if MyMove==1
StoneWord="stone"
else
StoneWord="stones"
endif
message(ScriptTitle,"The best move is to take %MyMove% %StoneWord%.")
endwhile
Article ID: W12478
Filename: How to win at Stones.txt