@echo off
title 3x3 Scambler
color 1f
:begin
cls
echo.
echo What type of scramble would you like?
echo.
echo a) Normal
echo b) 2-Gen
echo c) 3-Gen
echo.
set /p enter=
:start
cls
set loopnumber=0
echo.
echo This may take a few seconds...
:loop
if %loopnumber%==25 goto endloop
set /a loopnumber=%loopnumber%+1
if /I %enter%==a goto normal
if /I %enter%==b goto 2gen
if /I %enter%==c goto 3gen
if /I %enter%==exit exit
if /I %enter%==quit exit
:normal
set rnd=%random%
if %rnd% gtr 1800 goto normal
if %rnd% lss 1 goto normal
goto 000
:2gen
if %loopnumber%==1 goto uface
if %loopnumber%==3 goto uface
if %loopnumber%==5 goto uface
if %loopnumber%==7 goto uface
if %loopnumber%==9 goto uface
if %loopnumber%==11 goto uface
if %loopnumber%==13 goto uface
if %loopnumber%==15 goto uface
if %loopnumber%==17 goto uface
if %loopnumber%==19 goto uface
if %loopnumber%==21 goto uface
if %loopnumber%==23 goto uface
if %loopnumber%==25 goto uface
:redo
set rnd=%random%
if %rnd% gtr 600 goto redo
if %rnd% lss 300 goto redo
goto 000
:uface
set rnd=%random%
if %rnd% gtr 300 goto uface
if %rnd% lss 1 goto uface
goto 000
:3gen
set rnd=%random%
if %rnd% gtr 900 goto 3gen
if %rnd% lss 1 goto 3gen
goto 000
:000
if %rnd% gtr 100 goto 100
set rnd=U
goto end
:100
if %rnd% gtr 200 goto 200
set rnd=U2
goto end
:200
if %rnd% gtr 300 goto 300
set rnd=U'
goto end
:300
if %rnd% gtr 400 goto 400
set rnd=R
goto end
:400
if %rnd% gtr 500 goto 500
set rnd=R2
goto end
:500
if %rnd% gtr 600 goto 600
set rnd=R'
goto end
:600
if %rnd% gtr 700 goto 700
set rnd=F
goto end
:700
if %rnd% gtr 800 goto 800
set rnd=F2
goto end
:800
if %rnd% gtr 900 goto 900
set rnd=F'
goto end
:900
if %rnd% gtr 1000 goto 1000
set rnd=L
goto end
:1000
if %rnd% gtr 1100 goto 1100
set rnd=L2
goto end
:1100
if %rnd% gtr 1200 goto 1200
set rnd=L'
goto end
:1200
if %rnd% gtr 1300 goto 1300
set rnd=D
goto end
:1300
if %rnd% gtr 1400 goto 1400
set rnd=D2
goto end
:1400
if %rnd% gtr 1500 goto 1500
set rnd=D'
goto end
:1500
if %rnd% gtr 1600 goto 1600
set rnd=B
goto end
:1600
if %rnd% gtr 1700 goto 1700
set rnd=B2
goto end
:1700
set rnd=B'
goto end
:end
if %loopnumber%==1 set rnd1=%rnd%
if %loopnumber%==2 set rnd2=%rnd%
if %loopnumber%==3 set rnd3=%rnd%
if %loopnumber%==4 set rnd4=%rnd%
if %loopnumber%==5 set rnd5=%rnd%
if %loopnumber%==6 set rnd6=%rnd%
if %loopnumber%==7 set rnd7=%rnd%
if %loopnumber%==8 set rnd8=%rnd%
if %loopnumber%==9 set rnd9=%rnd%
if %loopnumber%==10 set rnd10=%rnd%
if %loopnumber%==11 set rnd11=%rnd%
if %loopnumber%==12 set rnd12=%rnd%
if %loopnumber%==13 set rnd13=%rnd%
if %loopnumber%==14 set rnd14=%rnd%
if %loopnumber%==15 set rnd15=%rnd%
if %loopnumber%==16 set rnd16=%rnd%
if %loopnumber%==17 set rnd17=%rnd%
if %loopnumber%==18 set rnd18=%rnd%
if %loopnumber%==19 set rnd19=%rnd%
if %loopnumber%==20 set rnd20=%rnd%
if %loopnumber%==21 set rnd21=%rnd%
if %loopnumber%==22 set rnd22=%rnd%
if %loopnumber%==23 set rnd23=%rnd%
if %loopnumber%==24 set rnd24=%rnd%
if %loopnumber%==25 set rnd25=%rnd%
goto loop
:endloop
cls
echo.
echo The scramble is:
echo.
echo %rnd1% %rnd2% %rnd3% %rnd4% %rnd5% %rnd6% %rnd7% %rnd8% %rnd9% %rnd10% %rnd11% %rnd12% %rnd13% %rnd14% %rnd15% %rnd16% %rnd17% %rnd18% %rnd19% %rnd20% %rnd21% %rnd22% %rnd23% %rnd24% %rnd25%
echo.
pause
cls
echo.
echo If you want to go back to the menu press a.
echo If you want another scramble press b.
echo.
set /p where=
if /I %where%==a goto begin
if /I %where%==b goto start
if /I %where%==exit exit
if /I %where%==quit exit