aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/evolver.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/evolver.c b/src/evolver.c
index ba043a3..d72f38b 100644
--- a/src/evolver.c
+++ b/src/evolver.c
@@ -113,6 +113,17 @@ generateRandomNumber(void)
}
void
+se_randomize(void)
+{
+ sword addr;
+ assert(g_isInit);
+
+ for (addr = 0; addr < sm_getSize(); addr++) {
+ sm_setInstAt(addr, (sbyte)(generateRandomNumber() % SINST_COUNT));
+ }
+}
+
+void
se_cycle(void)
{
assert(g_isInit);