Fred is on the 100 Day Journey, and asks for advice:
Any hints, tips, how tos and whatnot are very welcome to me
First, welcome to the community. Ask questions! And code every day! It's helpful to know what day you are on when you ask questions. Perhaps you missed a key lesson in a past assignment? or perhaps the answer will be in an upcoming lesson. Hard to tell, if we don't know where you are on your journey.
Here's my first hint. Model -- View -- ViewModel aka MVVM. Read up. Watch the vids. Look for other sources to help you understand this concept.
Models
Your game pieces, cards, dice, and your game board will all be models. That is, they will have structures that describe the pieces, dice, cards, board, and board positions. If two pieces battle for dominance, you will use the rules in your models to determine the outcome. Rules, pieces, damage, strength, options are all encoded in your model.
Views
Your views are what your players see on screen. A view should only represent what the model contains. Piece number six is a knight, and sits at position G-6? Ask the model where it is, and this is what the view should show. The knight has 30% damage? Ask the knight for its health value and represent that in the view with cool icons, gradients, or other indicator.
View Models
The view-model is the go between. The user clicks or drags a piece in the view. The view executes a function or method that is coded in the view-model, sometimes call a intent. The intent (move piece, reduce health) updates the properties in the model. When the properties in the model are updated, this probably triggers the views to redraw themselves.
I may have oversimplified the MVVM concept. There may be BIG gaps in this explanation. But you might consider asking yourself some questions as you build your application: "What is the purpose of this code? Is it a game rule? Is this an action or event? Will I be drawing this on screen?" Your answer may determine where (View? Model? ViewModel?) you place the code.
During your journey you will find yourself writing game rules in some button on a view. Or you may find yourself determining the color of text in your model. You'll refactor many times to get the balance right! You'll find yourself moving game rules into your model. Adding an intent into your ViewModel, then calling that intent from a button in your game View.
Good luck! Keep us posted on your progress.
Keep Coding