[engine] fix
This commit is contained in:
@@ -23,6 +23,10 @@ class Direction {
|
||||
return from(-x, -y);
|
||||
}
|
||||
|
||||
public function equals(other:Direction):Bool {
|
||||
return other.x == x && other.y == y;
|
||||
}
|
||||
|
||||
public static function from(x:Int, y:Int):Direction {
|
||||
return directions.get(x + y * 10);
|
||||
}
|
||||
@@ -36,4 +40,8 @@ class Direction {
|
||||
case _: null;
|
||||
}
|
||||
}
|
||||
|
||||
public function toString():String {
|
||||
return 'Direction{x=$x,y=$y}';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user