foul-magics/Mage/src/main/java/mage/choices/VoteHandlerAI.java
Evan Kranzler 1cbbcddcc6
Improving implementation of cards which use voting (WIP) (#7566)
* created interface for handling voting

* created class for two choice votes, refactored a card to use it

* refactored all cards which use two choice votes

* updated VoteHandler to an abstract class to encapsulate more of its functions

* refactored cards which vote for more than two things

* [CNS] Implemented Brago's Representative

* [CN2] Implemented Ballot Broker

* [CN2] Implemented Illusion of Choice

* [CNS] Implemented Grudge Keeper

* added vote outcomes

* updated implementation of Illusion of Choice to work correctly in multiples

* added test for voting

* updated implementation of extra votes

* simplified vote message handling

* Improved names, additional comments

* Votes: fixed not working getMostVoted

* Votes: added final vote results to game logs;

* Votes: added additional info for the vote choices;

* Votes: added vote step info in choose dialogs, added AI support example for Tyrant's Choice;

Co-authored-by: Oleg Agafonov <jaydi85@gmail.com>
2021-03-20 18:32:54 +04:00

23 lines
No EOL
651 B
Java

package mage.choices;
import mage.abilities.Ability;
import mage.game.Game;
import mage.players.Player;
/**
* @author JayDi85
*/
@FunctionalInterface
public interface VoteHandlerAI<T> {
/**
* AI choosing hints for votes
*
* @param voteHandler voting handler for choosing
* @param aiPlayer player who must choose
* @param aiDecidingPlayer real player who make a choice (cab be changed by another effect, example: Illusion of Choice)
* @param aiSource
* @param aiGame
*/
T makeChoice(VoteHandler<T> voteHandler, Player aiPlayer, Player aiDecidingPlayer, Ability aiSource, Game aiGame);
}