mirror of
https://github.com/magefree/mage.git
synced 2025-12-24 20:41:58 -08:00
AI: removed outdated AIMinimax project (#7075), removed some useless player classes, code and config files, improved docs;
This commit is contained in:
parent
6ac2f44cc1
commit
08b99fcbf7
40 changed files with 103 additions and 2462 deletions
|
|
@ -199,7 +199,7 @@ public abstract class MatchImpl implements Match {
|
|||
matchPlayer.getPlayer().init(game);
|
||||
game.loadCards(matchPlayer.getDeck().getCards(), matchPlayer.getPlayer().getId());
|
||||
game.loadCards(matchPlayer.getDeck().getSideboard(), matchPlayer.getPlayer().getId());
|
||||
game.addPlayer(matchPlayer.getPlayer(), matchPlayer.getDeck());
|
||||
game.addPlayer(matchPlayer.getPlayer(), matchPlayer.getDeck()); // TODO: keeps old player?!
|
||||
// time limits
|
||||
matchPlayer.getPlayer().setBufferTimeLeft(options.getMatchBufferTime().getBufferSecs());
|
||||
if (games.isEmpty()) {
|
||||
|
|
|
|||
|
|
@ -1,16 +1,19 @@
|
|||
package mage.players;
|
||||
|
||||
/**
|
||||
* Created by IGOUDT on 2-4-2017.
|
||||
* Server: all possible player types
|
||||
* <p>
|
||||
* Warning, do not change description - it must be same with config.xml file
|
||||
*
|
||||
* @author IGOUDT
|
||||
*/
|
||||
public enum PlayerType {
|
||||
HUMAN("Human"),
|
||||
COMPUTER_DRAFT_BOT("Computer - draftbot"),
|
||||
COMPUTER_MINIMAX_HYBRID("Computer - minimax hybrid"),
|
||||
COMPUTER_MONTE_CARLO("Computer - monte carlo"),
|
||||
COMPUTER_MAD("Computer - mad");
|
||||
|
||||
String description;
|
||||
final String description;
|
||||
|
||||
PlayerType(String description) {
|
||||
this.description = description;
|
||||
|
|
@ -27,6 +30,6 @@ public enum PlayerType {
|
|||
return type;
|
||||
}
|
||||
}
|
||||
throw new IllegalArgumentException(String.format("PlayerType (%s) is not configured", description));
|
||||
throw new IllegalArgumentException(String.format("PlayerType (%s) is not configured in server's config.xml", description));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -35,7 +35,10 @@ import java.util.UUID;
|
|||
|
||||
import static com.google.common.collect.Iterables.getOnlyElement;
|
||||
|
||||
public class StubPlayer extends PlayerImpl implements Player {
|
||||
/**
|
||||
* Empty player, do nothing, used for tests only
|
||||
*/
|
||||
public class StubPlayer extends PlayerImpl {
|
||||
|
||||
@Override
|
||||
public boolean choose(Outcome outcome, Target target, Ability source, Game game) {
|
||||
|
|
@ -209,7 +212,7 @@ public class StubPlayer extends PlayerImpl implements Player {
|
|||
|
||||
@Override
|
||||
public List<Integer> getMultiAmountWithIndividualConstraints(Outcome outcome, List<MultiAmountMessage> messages,
|
||||
int min, int max, MultiAmountType type, Game game) {
|
||||
int min, int max, MultiAmountType type, Game game) {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
@ -227,10 +230,10 @@ public class StubPlayer extends PlayerImpl implements Player {
|
|||
public void pickCard(List<Card> cards, Deck deck, Draft draft) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void addPhyrexianToColors(FilterMana colors) {
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue