This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

Loopy
Loopy presents ...

2012/5/6

Cute Dogs

No description.

3589 views / 8 in the last 7 days

1 vote | 0 in the last 7 days

Tags: with-source

open in greenfoot
Your browser does not support the canvas tag.
LoopyLoopy

2012/5/6

I did the other way around but I got it to work. Next step: I am to get the dog to greet the other dogs with a dance. I know how to make the dog dance and how to get it to the other dogs. I have not yet been able to get the words that the compiling will accept.
A new version of this scenario was uploaded on Sun May 06 15:07:26 UTC 2012 Need help in learning how to code. Definitions of terms are not clear yet.
LoopyLoopy

2012/5/6

Next step has been done but won't stop doing it. Need to figure out how to shorten the time act is being done.
A new version of this scenario was uploaded on Sun May 06 21:46:38 UTC 2012 Made myDog dance when greeting another dog.
SPowerSPower

2012/5/7

Drag the speed slider :)
LoopyLoopy

2012/5/11

I still have not been able to get myDog to greet another dog an then stop on its own. myDog will dance and then stop when the dance() method is invoked but not when is is brought on by greeting the other dogs. What method should I use to correct this? an if/else statement?
A new version of this scenario was uploaded on Fri May 11 19:42:19 UTC 2012 myDog now stops after it is done greeting dog.
LoopyLoopy

2012/5/11

I still do not understand where to begin to subtract energy from the dog's energy supply.
LoopyLoopy

2012/5/11

How do I know if this works other than it will compile? private int countSteps = 0; { for (int counter = 0; counter < 1; counter++) { countSteps = countSteps + 1; if (countSteps == 30) { energy--; countSteps = 0; } } }
SPowerSPower

2012/5/12

The for loop just does it once: you can remove the for loop. And I don't see the energy instance variable, so it this shouldn't compile.

See all comments

Want to leave a comment? You must first log in.

Who likes this?

Busch2207