Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off & Title RNG Animation concept
- Setlocal EnableDelayedExpansion
- Set /A width=41,hieght=19
- Mode Con: cols=%width% lines=%hieght%
- Set /A hieght-=1,width-=1
- REM Pattern Definition - 1 of three possible patterns generated at random. Pattern count Increased / Decreased
- REM (cont) depending on how p# values are utilised in :Loop
- For /L %%A in (1,1,2) Do (Set /A p%%A=!random! %%2 + 2)
- REM Color Change and print loop. Pattern can be further modified by exchanging utilisation of p# in For /L (Set)
- :Loop
- For /L %%A In (!p1!,!p1!,!hieght!) Do (
- For /L %%B In (!p1!,!p1!,!width!) Do (
- Set /A r1=!Random! %%10 + 1,r2=!random! %%10 + 1
- Set /A "C=(!Random! %%3) + 34"
- IF !r1! LEQ !r2! (Set ".=[%%A;%%BH[1m[!C!m[7m [0m") Else (Set ".=[%%A;%%BH[!C!m[7m [0m")
- ECHO(!.!
- )
- )
- For /L %%A In (!p2!,!p1!,!hieght!) Do (
- For /L %%B In (!p2!,!p1!,!width!) Do (
- Set /A r1=!Random! %%10 + 1,r2=!random! %%10 + 1
- Set /A "C=(!Random! %%4) + 34"
- IF !r1! LEQ !r2! (Set ".=[%%A;%%BH[1m[!C!m[7m [0m") Else (Set ".=[%%A;%%BH[!C!m[7m [0m")
- ECHO(!.!
- )
- )
- GOTO :Loop
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement