Saturday, October 29, 2022
HomeGame Developmentjava - Handle sport states of a card sport with MVC

java – Handle sport states of a card sport with MVC


I’m making a Yugioh java sport with MVC. I used to be questioning wich is the higher approach to handle sport states with MVC? I tought possibly I can use State Sample in Mannequin part with DrawPhase, InvocationPhase and BattlePhase as states, however on this approach I will not know wich participant has invoked a card or do one thing. Is there one other approach that enable me to know the entire sport state and have management over the turns?
Additionally I am undecided about utilizing Threads with a Laptop bot to play with so the thought of a sport loop is nearly discarded.

This Yugioh sport is a bit more easy:

On every flip you:

-Choose a card out of your Deck and add it to your Hand

-Invoke monsters and spells to the board

-Battle Part: atack to the opponent together with your monsters which can be within the board or use your spells which can be within the board to: harm the opponent, acquire life factors, enhance harm of monsters, and so on.
Monsters that struggle can die and go to the gaveyard. (every participant has a gaveyard)

-Subsequent flip and repeat.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisment -
Google search engine

Most Popular

Recent Comments