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

shrucis1's Comments

Back to shrucis1's profile

Wow, this is really cool. I especially like how you had the hills and everything!
150, then I got dizzy.
Wow, this is really neat, I hadn't thought of trying to code Conway's Game of Life in Greenfoot. As soon as I saw this, I immediately started playing with the spaceships! XD
What's the worst that could happen? *sees demon approaching behind me* O_O
I'm the 666th viewer. Is this bad?
Neat game! Oddly addictive, though you might want to add some sort of a score system or a counter. I did notice you had a counter class in the project, but you didn't seem to be using it. Still, it's a fun game!
When you create a constructor for a class, whenever you create a new class, you need to pass in the variable. Here's an example not in greenfoot: public class myPrint { public myPrint(string whatToPrint) { print(whatToPrint); } } Then I'd do: new myPrint("TestPrint") and by passing in the string "TestPrint", the object myPrint would set its variable whatToPrint to "TestPrint" It's sortof a difficult concept to grasp, I hope I explained it well.
Sure, I'll re-upload it with open source. The way I did that though was with a constructor, the bullet class looks something like this: public class Bullet extends Actor { public Bullet(int dir) { setRotation(dir); } public void act() { move(5); } } Then, when I create the bullet I do it like this: getWorld().addObject(new Bullet(getRotation()), getX(), getY());
Thanks! Like I said though, it's not done yet. Also, I normally leave sound on my computer off, so sometimes I forget about it. I'll try to add sound to the next version, thanks for the feedback!