//![0] //Note that X/Y referred to here are in game coordinates var maxX = 10;//Nums are for tileSize 40 var maxY = 15; var tileSize = 40; var maxIndex = maxX*maxY; var board = new Array(maxIndex); var tileSrc = "Block.qml"; var component; //Index function used instead of a 2D array function index(xIdx,yIdx) { return xIdx + (yIdx * maxX); } function initBoard() { //Calculate board size maxX = Math.floor(background.width/tileSize); maxY = Math.floor(background.height/tileSize); maxIndex = maxY*maxX; //Initialize Board board = new Array(maxIndex); for(var xIdx=0; xIdx