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
1 changed files with 2 additions and 2 deletions

View File

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