意味が分からないw マップみたいな

by coppieee forked from 意味が分からないw AS3 (diff: 122)
♥10 | Line 93 | Modified 2009-11-27 01:44:30 | MIT License
play

ActionScript3 source code

/**
 * Copyright coppieee ( http://wonderfl.net/user/coppieee )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/nLOK
 */

// forked from nitoyon's 意味が分からないw AS3
// forked from 9re's forked from: 意味が分からないw
// forked from paq's 意味が分からないw
package {
    import flash.display.Sprite;
	import flash.utils.setInterval;
    public class FlashTest extends Sprite {
        public function FlashTest(  ) {
            init(10, 10, 4)
            ()(R )()()()(R )()()()(R )()(ENTER)
            (U )()()()(L )()()()(L )()()(ENTER)
            (  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(ENTER)
            (  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(ENTER)
            (  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(ENTER)
            (  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(ENTER)
            (  )()()()()( R)()()(  )(  )(  )(ENTER)
            (  )()(  )(  )(  )(  )(  )()(  )(  )(  )(ENTER)
            (  )()(  )(  )(  )(  )(  )(D )(  )(  )(  )(ENTER)
            (  )()(  )(  )(  )(  )(  )()(  )(  )(  )(ENTER)
            (  )()(  )(  )()()()()(  )(  )(  )(ENTER)
            (  )()(  )(  )()(  )(  )(  )(  )(  )(  )(ENTER)
            (  )()(  )(  )()(  )(  )(  )(  )(  )(  )(ENTER)
            (  )()(  )(  )()(  )(  )(  )(  )(  )(  )(ENTER)
            (  )()()()(L )(  )(R )()()()()(ENTER)
            (  )(  )(  )(  )(  )(  )()(  )(  )(  )()(ENTER)
            (  )(  )(  )(  )(  )(  )()(  )(  )(  )()(ENTER)
            (  )(  )(  )(  )(  )(  )()(  )(  )(  )()(ENTER)
            (  )(  )(  )(  )(  )(  )()(  )(  )(  )()(ENTER)
            (  )(  )(  )(  )(  )(  )()(  )(  )(  )()(ENTER)
            (  )(  )(  )(  )(  )(  )()()()(L )()(ENTER)
            (  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(ENTER)
            (  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(ENTER)
            (  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(ENTER)
            (  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(ENTER)
            (  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(ENTER)
            (  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(ENTER)
            (  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(ENTER)
            (  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(ENTER)
            (  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(ENTER)
            (  )(  )(  )(  )(  )(  )(  )(  )(  )(  )(  )
        }
		private const :uint = 1;
		private const :uint = 2;
		private const :uint = 4;
		private const :uint = 8;
		private const :uint = 0x10;
		private const R:uint =  | ;
		private const L:uint =  | ;
		private const U:uint =  | ;
		private const D:uint =  | ;
		
		private const ENTER:uint = 0x20;
        
		private function init($width:int, $height:int, $margin:int):Function {
			var xs:Array = [[]];
			var row:int = 0;
			var column:int = 0;
			function draw(r:int, c:int, color:uint=0xcccccc):void {
				graphics.beginFill(color);
				graphics.drawRect(c * ($width + $margin), r * ($width + $margin), $width, $height);
				graphics.endFill();
			}
			
			return function(x:uint = 0):Function {
				if ((x & ENTER) != 0) {
					
					row ++;
					column = 0;
					xs.push([]);
					return arguments.callee;
				}
				xs[row][column] = x;
				if ((x & ) != 0) {
					(function():void {
						var ro:uint = row;
						var co:uint = column;
						setInterval(function():void {
							var current:uint = xs[ro][co];
							draw(ro, co);
							if ((current & ) != 0) {
								co++;
							}else if ((current & )!=0) {
								co--;
							}else if ((current & ) != 0) {
								ro --;
							}else if ((current & ) != 0) {
								ro++;
							}
							draw(ro, co, 0xff);
					}, 300); } )();
					
					draw(row, column, 0xff);
				}else {
					draw(row, column);
				}
				
				column++;
				return arguments.callee;
			}
		}
    }
}

Forked