I am very new to game development, but not to programming.
I have created a
Paddle object which has the following properties...
I also have a
Pong object which has properties such as...
draw() method currently is resetting the
canvas and that is where a question came up.
Paddle object have a
draw() method responsible for its drawing, or should the
draw() of the
Pong object be responsible for drawing its actors (I assume that is the correct term, please correct me if I'm incorrect).
I figured that it would be advantagous for the
Paddle to draw itself, as I instantiate two objects,
Enemy. If it were not in the
draw(), I'd need to write similar code twice.
What is the best practice here?