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

danpost's Comments

Back to danpost's profile

@Duta, I cannot be sure. It was too long ago. This was like my 3rd project in Greenfoot. I am not sure if I was using static variables at that point. However, I noticed I had said that it compiled different each time; which indicates that it was probably something else.
There is another, older, scenario (2010/12/8) called 'Blocks' that has the same concept. It is at: http://www.greenfoot.org/scenarios/2253
A lot of folks have been asking about how to detect collisions, or how not to pass through objects, so I created this example which also has an example of how one can sub-class my 'Bar' class to give it some functionality.
I remember something like this; except the rows were 3, 5, and 7 and the LOSER got the last match.
The ball also seems to penetrate the paddle a bit before bouncing.
I added a 'bigRefresh();' as the first statement in the scroll() method and it seemed to work OK.
I had the pong ball go directly up and down, and I could not change its direction to eliminate any more red dots.
And if you did upload it mistakenly, log on, go to your page (click on your name), select the scenario, and click on 'delete scenario'.
danpostdanpost

2012/5/13

As I played on, the number of food that remained decreased. When I got to 21, there was no more food to eat. I'm hungry, please!