# Confused about display list and organising my classes

**URL:** <https://forum.kirupa.com/t/confused-about-display-list-and-organising-my-classes/305972>\
**Category:** Uncategorized\
**Created:** [March 6, 2010, 9:16pm UTC](https://forum.kirupa.com/t/confused-about-display-list-and-organising-my-classes/305972 "2010-03-06T21:16:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicolanicola](https://avatars.discourse-cdn.com/v4/letter/n/c89c15/32.png) [@nicolanicola](https://forum.kirupa.com/u/nicolanicola)\
**Post date:** [March 6, 2010, 9:16pm UTC](https://forum.kirupa.com/t/confused-about-display-list-and-organising-my-classes/305972/1 "2010-03-06T21:16:19Z")

</div>

I’m making the game Breakout as an AS3 application using OOP. I am getting very confused though. I know that objects should be only responsible for themselves. But this is where I get stuck, they need to communicate as some level to add and remove screens, and I am getting majorly confused as to what is going too far, when it could maybe achieved in a simpler more OOP way.

I’ve worked out the hierarchy of my classes, in terms of where they are being added (I think). I’ve attached it as a screenshot.

Have I got the order right based on OOP principles? Like, Introscreen will listen for play being pressed then call a method of the document class that will remove introscreen and then attach gamescreen. Is that right?

Another thing that puzzples me. It seems to me if I made a level and put the paddle and the ball in that, then arranged all the bricks in that level, that I’d be duplicating work (based on the fact I need paddle and ball for level 2 also). So it would be best if I could have gamescreen with paddle and the ball and then add level1/2/3 to display list which would therefore set up the appropriate brick placement. But then, wouldn’t that mean that I couldn’t do hittests because my level 1/2 or 3 wouldn’t be a sibling to the bat and the ball, them residing as a sibling in the level’s parent class?

Please help if you can. I’m extremely puzzled and can’t stop frowing.
