make member a pointer for nil json
This commit is contained in:
@@ -84,8 +84,8 @@ func (g *game) run() {
|
||||
p.scan()
|
||||
p.nudge()
|
||||
// XXX: change to pointer, check for pointer as (0, 0) is valid target
|
||||
if p.Robot.FireAt.X != 0 && p.Robot.FireAt.Y != 0 {
|
||||
proj := p.fire()
|
||||
if p.Robot.FireAt != nil {
|
||||
proj := p.fire(g.projectiles)
|
||||
if proj != nil {
|
||||
g.projectiles[proj] = true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user