//===================================================================== // InitArrays: Sets up the statistics for the plays (c) 1996 // Author : Chris Strickland // Company : New Horizons Software // : Links to the WEB page are welcomed // : Any copying of the code on this page will be under the // : standard shareware license agreement. Donations are // : appreciated and will encourage future development of WEB // : products. // Developed: Sep 4, 98 - Extracted from initfoot. //===================================================================== var DEBUG=0; var toExpire = new Date(); toExpire.setTime(toExpire.getTime() + 1000*60*60*24); //--------------------------------------------------------- //--------------------------------------------------------- // Create and initialize two dimensional arrays //--------------------------------------------------------- function initNumberArray(m,n,init) { this.size = m*n; for (i = 0 ; i <= m ; i++) { for (j=0; j<=n ; j++) { this[i+(j*m)] = init //Initialize all of the left hand elements } } return this; //Return the array object to the caller } //--------------------------------------------------------- // Create and initialize string arrays //--------------------------------------------------------- function initStringArray(m) { var i; this.size = m; for (i = 0 ; i <= m ; i++) this[i] = "" //Initialize all of the left hand elements return this; //Return the array object to the caller }