[config] config.yaml

This commit is contained in:
2018-01-11 16:34:21 +03:00
parent 729798bc25
commit 21bf2f9ba1
12 changed files with 209 additions and 168 deletions

View File

@@ -26,4 +26,14 @@ class Direction {
public static function from(x:Int, y:Int):Direction {
return directions.get(x + y * 10);
}
@:from static public function fromString(s:String):Direction {
return switch(s) {
case 'left': LEFT;
case 'top': TOP;
case 'right': RIGHT;
case 'bottom': BOTTOM;
case _: null;
}
}
}