From 2b710ef40d981d5441e8a3ecec61571c1a633b07 Mon Sep 17 00:00:00 2001 From: Stephen McQuay Date: Sun, 11 May 2014 23:10:59 -0700 Subject: [PATCH] Removed the MiniObstacle nonsense. --- player.go | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/player.go b/player.go index 8c80d22..9af65ac 100644 --- a/player.go +++ b/player.go @@ -1,7 +1,6 @@ package client import ( - "fmt" "math" "math/rand" @@ -141,31 +140,3 @@ func (p *SimplePlayer) probe(destination vector.Point2d) bool { } return true } - -// MiniObstacle is a convenient way to encode/decode between the [4]int -> server.Obstacle -type MiniObstacle [4]int - -// id is used to calculate a key for use in maps -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() -} - -// ToObstacle is where the conversion magic happens -func (mo *MiniObstacle) ToObstacle() server.Obstacle { - return server.Obstacle{ - Bounds: vector.AABB2d{ - A: vector.Point2d{X: float32(mo[0]), Y: float32(mo[1])}, - B: vector.Point2d{X: float32(mo[2]), Y: float32(mo[3])}, - }, - } -}