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

GregC246's Comments

Back to GregC246's profile

Here you go: http://dl.dropbox.com/u/66182418/pacman.zip I'm pretty sure the spazzing was due to the fact that you actually turned the walls instead of just the images, so I made them rotate your images instead. (Look in SinglePlayer and Wall). I also overhauled your ghosts, and put all of their code into the Ghost class instead of the same thing in five different classes. I added a few methods to support this in Ghost-ghostOnFrame(), getExitCounterTime(), and getGhostSubimage(), which you should probably look at. I also added the ghostID variable, which keeps track of which type of ghost the actor is. (The main reason you shouldn't copy/paste large amounts of code into multiple classes is that if you edit one, then you will have to edit all of them. With all the code in Ghost, you only have to change that code.) I left almost all the unused code still in there, but commented. You should delete it if you don't need it anymore. Let me know if you have any issues (there's a decent chance I screwed something up without realizing it).
Cool, I'll check it out.
Just wondering, why did you decide to use separate subclasses for all the walls instead of putting it all in the Wall class?It looks like you were about to do so, and then commented it all out. Great job by the way. Pretty indistinguishable from the original.