remove some unused data from payload
This commit is contained in:
parent
6ff9606367
commit
43b68f27f8
2
game.go
2
game.go
@ -1,7 +1,6 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
v "bitbucket.org/hackerbots/vector"
|
||||
// "encoding/json"
|
||||
"errors"
|
||||
"log"
|
||||
@ -42,7 +41,6 @@ func NewBoardstate() *Boardstate {
|
||||
|
||||
type Scanner struct {
|
||||
Id string `json:"id"`
|
||||
Position v.Point2d `json:"position"`
|
||||
Type string `json:"type"`
|
||||
}
|
||||
|
||||
|
@ -182,10 +182,6 @@ func (p *player) scan(g *game) {
|
||||
if dist < float32(p.Robot.Stats.ScannerRadius) {
|
||||
s := Scanner{
|
||||
Id: player.Robot.Id,
|
||||
Position: v.Point2d{
|
||||
X: player.Robot.Position.X,
|
||||
Y: player.Robot.Position.Y,
|
||||
},
|
||||
Type: "robot",
|
||||
}
|
||||
p.Robot.Scanners = append(p.Robot.Scanners, s)
|
||||
@ -201,10 +197,6 @@ func (p *player) scan(g *game) {
|
||||
if dist < float32(p.Robot.Stats.ScannerRadius) {
|
||||
s := Scanner{
|
||||
Id: proj.Id,
|
||||
Position: v.Point2d{
|
||||
X: proj.Position.X,
|
||||
Y: proj.Position.Y,
|
||||
},
|
||||
Type: "projectile",
|
||||
}
|
||||
p.Robot.Scanners = append(p.Robot.Scanners, s)
|
||||
|
Loading…
Reference in New Issue
Block a user