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

SPower's Comments

Back to SPower's profile

If you want to learn, just follow the course. I'll post the source code, but not now.
Drag the speed slider :)
Your MyDog class has an empty act() method, so put just one of the Dog objects in your world, and the rest must be objects of the class MyDog. If you do that, just one dog will move.
Ok, I think you'll get a great grade!
This is great! This was for your final year at school? What was your grade?
SPowerSPower

2012/5/4

Sorry: I'll fix it.
SPowerSPower

2012/5/4

I don't think I will do so...
In your readme 'file', you say things like "up(); moves the Class up.". That's not true. up() isn't a class/static method, so it can't do anything with the class. You need to say "up(); moves the object up.", because you call the methods you created to objects, not to classes. By the way, you do this in gotomouse(): if (Greenfoot.mouseMoved(null) ) { MouseInfo mouse = Greenfoot.getMouseInfo(); setLocation (mouse.getX(), mouse.getY()); } It's better to do this: if (Greenfoot.mouseMoved(null) ) { MouseInfo mouse = Greenfoot.getMouseInfo(); if (mouse == null) return; setLocation (mouse.getX(), mouse.getY()); } Now, you return if the mouse info isn't available. When you do this, you have less chrashes. (little tip: change gotomouse() to goToMouse(), more readable ;) ) I hope this helps!
SPowerSPower

2012/5/3

Moves too slow, so it's too easy. If you would let it move faster, it would become harder and more fun to play.