/*
 *  Define functions about levels creation.
 */
/*
 *  From an array schema[] generate the level
 */
function init_level( schema, bricks, parnt){
	for(i = 0 ; i < schema.length ; i++){
		var row = schema[i];
		for(j = 0 ; j < row.length ; j++){
			if(row[j] == 'x')
				bricks.push(new block(j*40, i*15,'rgb(255,255,0)', parnt));
		}
	}
}

var level = new Array();
level.push([' ',' ',' ',' ',' ','x','x','x',' ','x']);
level.push(['x',' ',' ',' ',' ',' ',' ',' ',' ',' ']);
level.push([' ','x','x',' ',' ',' ',' ',' ',' ',' ']);
level.push([' ','x',' ','x',' ',' ',' ',' ',' ',' ']);
level.push(['x','x','x',' ',' ',' ',' ',' ',' ',' ']);
level.push([' ',' ',' ',' ',' ',' ',' ',' ',' ',' ']);
level.push([' ',' ','x',' ','x','x',' ',' ',' ',' ']);
level.push([' ',' ',' ',' ',' ',' ',' ',' ',' ',' ']);
level.push([' ',' ',' ',' ',' ',' ',' ',' ',' ',' ']);
level.push([' ',' ',' ',' ',' ',' ',' ',' ',' ',' ']);

