function setup(){ wolf = new Array(); Wolf[0]=210; Rabbit = new Array(); Rabbit[0]=0; go(); } //Starts the models function go(){ var x=0 while(true){ for(var num=0;num 0) && (Wolf[num] + a < 399)) {Wolf[0]=Wolf[0]+a}; }; for(var num=0;num 0) && (Rabbit[num] + a < 399)) {Rabbit[0]=Rabbit[0]+a}; }; } eat() } function move(){ var rand = (Math.floor(Math.random()*4)); if(rand==0){ return 1}; if(rand==1){ return -1}; if(rand==2){ return 20}; if(rand==3){ return -20}; } function eat(){ for(var num=0;num