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

2020/2/12

Ping Pong Game

1
2
danpost danpost

2020/2/19

#
_kr_696 wrote...
ok so now what?
Add methods to the class to adjust the scores and update the Scoreboard object.
_kr_696 _kr_696

2020/2/20

#
he methods would go in what class? score or world?
danpost danpost

2020/2/20

#
_kr_696 wrote...
he methods would go in what class? score or world?
Same class (MyWorld).
_kr_696 _kr_696

2020/2/20

#
ok so if i want to update the score i would have to call the ball class in the world class, right?
danpost danpost

2020/2/20

#
_kr_696 wrote...
ok so if i want to update the score i would have to call the ball class in the world class, right?
No. You would call a method in your MyWorld class from the Ball class when scoring. Calling the method to update the scoreboard can be done from either class.
You need to login to post a reply.
1
2