diff --git a/server/witch/direction.go b/server/witch/direction.go new file mode 100644 index 0000000..75dbda3 --- /dev/null +++ b/server/witch/direction.go @@ -0,0 +1,31 @@ +package witch + +const ( + dirEast = "_DIR_EAST" + dirWest = "_DIR_WEST" + dirNorth = "_DIR_NORTH" + dirSouth = "_DIR_SOUTH" + dirAbove = "_DIR_ABOVE" + dirBelow = "_DIR_BELOW" +) + +type Direction struct { + raw string +} + +func (d Direction) Reverse() Direction { + // TODO + return Direction{} +} + +// NormalizeHuman takes a direction someone might type like "up" or "north" and returns the correct Direction struct +func NormalizeHuman(humanDir string) Direction { + // TODO + return Direction{} +} + +// Human returns a string form of this direction like "above" or "north" +func (d Direction) Human() string { + // TODO + return "" +} diff --git a/server/witch/witch.go b/server/witch/witch.go index 860517b..a49a69d 100644 --- a/server/witch/witch.go +++ b/server/witch/witch.go @@ -16,15 +16,6 @@ import ( lua "github.com/yuin/gopher-lua" ) -const ( - dirEast = "_DIR_EAST" - dirWest = "_DIR_WEST" - dirNorth = "_DIR_NORTH" - dirSouth = "_DIR_SOUTH" - dirAbove = "_DIR_ABOVE" - dirBelow = "_DIR_BELOW" -) - /* allows({ read = "world",