Game is written using MVC pattern. For each duck there is duck_view duck_controller and duck_model. Duck_controller is responsible for registering hit when the button(duck_view) is clicked. When duck hp equals 0 duck_controller makes button inVisible(duck killed). There is also game_state_model representing an amount of ducks in game. Who should change game_state_model when a duck dies since the duck_controller is responsible for killing the duck?
Aucun commentaire:
Enregistrer un commentaire