Structure of Match Card Game Code in view of the MVC design pattern


I finished the Match Card Game. Thanks once again for sharing this course!

One thing I was really wondering about is if the game logic isn’t supposed to be separate from the view controller. I might be wrong, but for me, after what I understood from the lesson about the MVC Design Pattern, the game logic is more part of the model than of the Controller. I’d highly appreciate your feedback on that matter.

Thanks in advance,

Hi Sam,


Game logic is just that, logic.

The model is only for “modeling” having some kind of representation of what your data looks like.

The model really shouldn’t have any logic in it.

The controller is where a majority of your logic is going to go.

I’d rewatch this video

logic should be inside the “controller”

Model View Controller
based from that then Model is the classes we created, including the data, View is the design in the storyboard. and Controller is where all the logic will be at, thats why its called “viewController”

Thank you very much for your prompt and helpful reply. Much appreciated.