aboutsummaryrefslogtreecommitdiff
path: root/random.c
diff options
context:
space:
mode:
authorquou <quou@disroot.org>2024-10-11 21:43:36 +1100
committerquou <quou@disroot.org>2024-10-11 21:43:36 +1100
commit24b72170d34cee515398f206f087bfeafc7b6b55 (patch)
tree24c2bc3d7e1c0bdac9de38dae3c5d2de7e669f25 /random.c
parent9add408984464bd6b3cc018bb14c3d69ad0a2898 (diff)
game is pretty much done kek
Diffstat (limited to 'random.c')
-rw-r--r--random.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/random.c b/random.c
index f4ddfb9..355920b 100644
--- a/random.c
+++ b/random.c
@@ -48,6 +48,10 @@ int random_table[] = {
};
static int index = 0;
+void set_ri(int i) {
+ index = i;
+}
+
int get_r(void) {
index = (index + 1) & random_table_mask;
return random_table[index];