package Game{
	public class LevelMap{
		/**
		
		Двумерный массив - собственно карта.
		 **/
		public var Fields:Array = new Array();
		public var InitPoint:Object = new Object();
		public var GhostHouse:Object = new Object();
		
		public function Moveable(mX:Number, mY:Number, Home:Boolean = false):Boolean{
			if(mX < 0){
				mX = Fields.length + mX;
			}
			
			if(mX > (Fields.length-1)){
				mX = 0;
			}
			
			if(Home && (Fields[mX][mY] == 8)){
				return true;
			}else{
				return ((Fields[mX][mY] == 0) || (Fields[mX][mY] == 1) || (Fields[mX][mY] == 2) || (Fields[mX][mY] == 21));
			}
		}
	}
}