magefree / mage

Magic Another Game Engine
http://xmage.today
MIT License
1.89k stars 773 forks source link

Redundant methods in Player class #11134

Open xenohedron opened 1 year ago

xenohedron commented 1 year ago

These methods are extremely similar as implemented in HumanPlayer. I can't find any documentation on why one would be used over the other. Perhaps they should be merged into a single method?

JayDi85 commented 1 year ago

In old days it must be used for targeted and non targeted choices. Now it implemented as isNotTarget method.

It's affect on unit tests too (it uses diff methods for addChoice, addTarget).

Maybe computer target simulations on the cast will be affected too (ai simulate all possible abilities to activate and all possible targets on the cast).

But all that code must be research for the actual state.

JayDi85 commented 1 year ago

It was about all choose and chooseTarget methods