summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkdx <kikoodx@paranoici.org>2023-05-05 19:12:15 +0200
committerkdx <kikoodx@paranoici.org>2023-05-05 19:12:15 +0200
commit49039e7cfe9ee1db083ce802460eaa3d791f2cec (patch)
tree79fbbadbbe43257e201f1d277ab5e71e2ddd89c5
parent89362ef1dc7223941d3267d50813544cef09672e (diff)
downloadstudy-sttky-49039e7cfe9ee1db083ce802460eaa3d791f2cec.tar.gz
only shuffle non 0 colors
-rw-r--r--src/main.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/main.c b/src/main.c
index 3301c1d..ac508c5 100644
--- a/src/main.c
+++ b/src/main.c
@@ -97,8 +97,8 @@ acid(void)
{
PxCol cols[8] = { 0, 1, 2, 3, 4, 5, 6, 7 };
for (int i = 0; i < 1024; i++) {
- const int i = rand() % 8;
- const int k = rand() % 8;
+ const int i = 1 + rand() % 7;
+ const int k = 1 + rand() % 7;
if (i == k)
continue;
cols[i] ^= cols[k];
@@ -107,5 +107,4 @@ acid(void)
}
for (int i = 0; i < 8; i++)
pxSpal(i, cols[i]);
- pxSpal(0, 0);
}