hugelgupf
09-30-2009, 02:41 PM
Hi,
atm I'm sitting in the Comp Science lesson and a bit confused.
I let a person walk, called Bob. While the up-key is pressed, it calls the following methods:
begin: bob.walkFirstStep
during: bob.walk
end: bob.walkLastStep
In bob.walk, there is a loop (i also tried while(true)), containing 2 DoTogethers and a lot of things inside of those. When I press "up" now and when I leave "up" after 2 steps, it screws everything up, because the loop is broken in between the 2 DoTogethers. How can I let Alice complete the whole loop, when I leave a key? (What a strange behavior...)
By the way, I wonder how DoTogether works, since Java is procedural... Do you split it up? What a work...
It's alice 2.2 beta 4/30/09
- Chris
atm I'm sitting in the Comp Science lesson and a bit confused.
I let a person walk, called Bob. While the up-key is pressed, it calls the following methods:
begin: bob.walkFirstStep
during: bob.walk
end: bob.walkLastStep
In bob.walk, there is a loop (i also tried while(true)), containing 2 DoTogethers and a lot of things inside of those. When I press "up" now and when I leave "up" after 2 steps, it screws everything up, because the loop is broken in between the 2 DoTogethers. How can I let Alice complete the whole loop, when I leave a key? (What a strange behavior...)
By the way, I wonder how DoTogether works, since Java is procedural... Do you split it up? What a work...
It's alice 2.2 beta 4/30/09
- Chris