Menu

#3 updateScore belongs in a timer, not in PigKeyNavBehaviour

open
nobody
None
4
2008-05-06
2008-05-06
Ted
No

Design/source review.

* View processElapsedFrames() in apps/PigShooter/Sources/PigKeyNavBehaviour.java

EXPECTED: no external calls.

ACTUAL: Key-nav-behaviour is tasked with updating the HUD display. This "sets a bad example for the chilluns" and, in general, is bad MVC.

What we want to do is make that call inside a timer created in the main PigShooter initialization. It is its own "controller."

Even better would be to make the HUD ("scorecard") be its own object, and IT can set up the timer at inception.

Discussion


Log in to post a comment.

MongoDB Logo MongoDB