made it so bots start inside world

This commit is contained in:
Stephen McQuay 2013-11-07 22:05:38 -08:00
parent c9ba660e7f
commit b490cfc228

View File

@ -292,8 +292,8 @@ func (p *player) fire(projectiles map[*Projectile]bool, turn int) *Projectile {
func (p *player) reset(g *game) { func (p *player) reset(g *game) {
for { for {
start_pos := v.Point2d{ start_pos := v.Point2d{
X: rand.Float32() * float32(*width), X: rand.Float32() * float32(g.width),
Y: rand.Float32() * float32(*height), Y: rand.Float32() * float32(g.height),
} }
p.Robot.MoveTo = &start_pos p.Robot.MoveTo = &start_pos
p.Robot.Position = start_pos p.Robot.Position = start_pos