package botclient import ( "fmt" "bitbucket.org/hackerbots/botserv" "bitbucket.org/hackerbots/vector" ) type MiniObstacle [4]int func (mo *MiniObstacle) id() string { return fmt.Sprintf( "%x%x%x%x", mo[0], mo[1], mo[2], mo[3], ) } func (mo MiniObstacle) String() string { return mo.id() } func (mo *MiniObstacle) toObstacle() botserv.Obstacle { return botserv.Obstacle{ Bounds: govector.AABB2d{ A: govector.Point2d{float32(mo[0]), float32(mo[1])}, B: govector.Point2d{float32(mo[2]), float32(mo[3])}, }, } }