made it so bots start inside world
This commit is contained in:
parent
c9ba660e7f
commit
b490cfc228
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user