WIP Direction struct
parent
209833798b
commit
8fd8331a96
|
@ -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 ""
|
||||
}
|
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue