previous

page 28

next
implementing next

You'll need my patterns.js file.

index.html
...
<script src='library.js'></script>
<script src='patterns.js'></script>
<script src='globals.js'></script>
...
changes to globals.js
var g_x, g_y, g_h;
var g_n=Random(g_patterns.length)-1;
var g_pattern=g_patterns[g_n];
var g_numbers='12345'.split('');
var g_i=0;
next()
function next() {
g_running=false;
stop();
g_n++;
if (g_n==g_patterns.length) g_n=0;
g_pattern=g_patterns[g_n];
target();
}
previous
next