How can you organize the code for a game to fit the MVC pattern?

前端 未结 6 2077
面向向阳花
面向向阳花 2020-12-22 15:46

I\'m a freshman in college going for my computer science degree... I\'ve programmed plenty the last several years but just lately I\'ve been getting more into theoretical id

6条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2020-12-22 15:56

    All of your listeners and handlers need to go inside the Controller class, state of the objects on screen (e.g. position, color, etc.) should be a part of your Model classes and whatever code that is drawing things on screen will be part of the View.

提交回复
热议问题