
[ad_1]
I’m making a Yugioh java sport with MVC. I used to be questioning wich is the higher technique to handle sport states with MVC? I tought possibly I can use State Pattern in Model part with DrawPhase, InvocationPhase and BattlePhase as states, however on this means I will not know wich participant has invoked a card or do one thing. Is there one other means that permit me to know the entire sport state and have management over the turns?
Also I’m unsure about utilizing Threads with a Computer bot to play with so the concept of a sport loop is nearly discarded.
This Yugioh sport is a bit more easy:
On every flip you:
-Pick a card out of your Deck and add it to your Hand
-Invoke monsters and spells to the board
-Battle Phase: atack to the opponent along with your monsters which can be within the board or use your spells which can be within the board to: injury the opponent, acquire life factors, improve injury of monsters, and many others.
Monsters that battle can die and go to the gaveyard. (every participant has a gaveyard)
-Next flip and repeat.
[ad_2]