function Mind() { //this.newRun = function() //{ //}; this.getAction = function ( state ) { i = 0; if(i != 1000){ max = 50; min = 1; ai = (Math.random() * ((max - min) + 1)) + min; aj = (Math.random() * ((max - min) + 1)) + min; } }; this.endRun = function() { }; }