Re: [go-nuts] Beginner Question : Reassignment of counter variable inside for loop in https://github.com/golang/mobile/tree/master/example/flappy

2017-02-23 Thread Victor Kovacs
Ah Thanks. Sorry i missed it in the FAQ. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https:

Re: [go-nuts] Beginner Question : Reassignment of counter variable inside for loop in https://github.com/golang/mobile/tree/master/example/flappy

2017-02-22 Thread Jesse McNelis
On Thu, Feb 23, 2017 at 8:59 AM, Victor Kovacs wrote: > > // The ground. >> for i := range g.groundY { >> i := i >> // The top of the ground. >> newNode(func(eng sprite.Engine, n *sprite.Node, t clock.Time) { >> > > While this solves the issue I would like to understand what is happening. > Any i

[go-nuts] Beginner Question : Reassignment of counter variable inside for loop in https://github.com/golang/mobile/tree/master/example/flappy

2017-02-22 Thread Victor Kovacs
Hi, I've recently started learning go as a way to learn mobile apps and have started experimenting with flappy from the mobile examples (https://github.com/golang/mobile/tree/master/example/flappy) While doing some changes I've run into a problem that I don't understand. The code : for