Source

ld3k / levels / RMGrid.as

package levels
{
	import objs.Line;
	import objs.Obj;
	import objs.RemoveLine;

	public class RMGrid extends LevelBase
	{
		public function RMGrid()
		{
			waves = 3;
		}
		override public function leveldata(wave:int):Vector.<Obj> 
		{
			var data:Array = [
				new Line(  1, 45,  0,  45,  95),								
				new Line(  2, 52,  0,  52,  95),								
				new Line(  3, 38,  0,  38,  95),								
				new Line(  4,  0, 38,  95,  38),								
				new Line(  5,  0, 45,  95,  45),								
				new Line(  6,  0, 52,  95,  52),								
				new Line(  7, 94,  0,  94,  95),								
				new Line(  8, 66,  0,  66,  95),								
				new Line(  9, 17,  0,  17,  95),								
				new Line( 10,  0, 17,  95,  17),								
				new Line( 11,  0, 73,  95,  73),								
				new Line( 12,  0, 80,  95,  80),								
				new Line( 13, 80,  0,  80,  95),								
				new Line( 14, 31,  0,  31,  95),								
				new Line( 15,  3,  0,   3,  95),								
				new Line( 16,  0,  3,  95,   3),								
				new Line( 17,  0, 94,  95,  94),								
				new Line( 18,  0, 59,  95,  59),								
				new Line( 19, 10,  0,  10,  95),								
				new Line( 20, 59,  0,  59,  95),								
				new Line( 21, 24,  0,  24,  95),								
				new Line( 22, 73,  0,  73,  95),								
				new Line( 23,  0, 24,  95,  24),								
				new Line( 24,  0, 66,  95,  66),								
				new Line( 25,  0, 87,  95,  87),								
				new Line( 26,  0, 31,  95,  31),								
				new Line( 27,  0,  9,  95,   9),								
				new Line( 28, 87,  0,  87,  95),								
			];
			var remove:Array; 
			if (wave == 0) {
				remove = [
				new RemoveLine(60, data[8]), 
				new RemoveLine(65, data[21]), 
				new RemoveLine(70, data[24]), 
				new RemoveLine(75, data[26]), 
				new RemoveLine(80, data[0]), 
				new RemoveLine(85, data[4]), 
				];
			} else if (wave == 1) {
				remove = [
				new RemoveLine(60, data[6]), 
				new RemoveLine(65, data[9]), 
				new RemoveLine(70, data[16]), 
				new RemoveLine(75, data[19]), 
				];
			} else {
				remove = [
				new RemoveLine(80, data[8]), 
				new RemoveLine(85, data[9]), 
				];
				
			}
			
			return Vector.<Obj>(data.concat(remove));
		}
	}
}