Examples of AIPlayer


Examples of basicObjects.Players.AIPlayer

    }

    public AbstractPlayer[] createPlayers(String p1, String p2) { //add in classes for guests and previous users!!

        if (p1.equals("HUMAN")) {players[0] = new HumanPlayer();}
        else if (p1.equals("AI")) {players[0] = new AIPlayer();}
        else if (p2.equals("HUMAN")) {players[1] = new HumanPlayer();}
        return players;
    }
View Full Code Here

Examples of cero.games.AIPlayer

    tryInstanciante(playerType);
    playersType.put(null, playerType);
  }

  void addAIType(Class<? extends AIPlayer> aiClass) throws NotInstantiableException {
    AIPlayer aip = (AIPlayer) tryInstanciante(aiClass);
    playersType.put(aip.getAIName(), aiClass);
  }
View Full Code Here

Examples of com.jcloisterzone.ai.AiPlayer

    protected void prepareAiPlayers() {
        for (PlayerSlot slot : slots) {
            if (slot != null && slot.isAi() && slot.isOwn()) {
                try {
                    AiPlayer ai = (AiPlayer) Class.forName(slot.getAiClassName()).newInstance();
                    ai.setGame(game);
                    ai.setServer(getConnection(), getServer());
                    for (Player player : game.getAllPlayers()) {
                        if (player.getSlot().getNumber() == slot.getNumber()) {
                            ai.setPlayer(player);
                            break;
                        }
                    }
                    game.getEventBus().register(ai);
                    logger.info("AI player created - " + slot.getAiClassName());
View Full Code Here

Examples of csa.jportal.ai.AIPlayer

        TestMatch match = new TestMatch();

        MatchStartOptions options = new MatchStartOptions();
        CardDeck.mDummyLoadingActive = true;
        // assuming a AI named SimpleAI exists!
        options.setPlayer1(new MatchComputerPlayer(new AIPlayer("SimpleAI")));
        options.setPlayer2(new MatchComputerPlayer(new AIPlayer("SimpleAI")));
        CardDeck.mDummyLoadingActive = false;

        Match.loadMatchUnstated(matchName, null, match, options);

        if (!match.didMatchStart()) return;
View Full Code Here

Examples of csa.jportal.ai.AIPlayer

    public boolean handleStack()
    {
        initEnvironment();
        int debugLevel=3;
        AIPlayer aiPlayer = E.player.getAIPlayer();

        String baseKey=E.match.getPlayerBaseKey(E.player);
        String cardKey = baseKey + "CARD_VECTOR";
        Vector cardsPlayed = (Vector) aiPlayer.getObjectData(cardKey);
        if (cardsPlayed == null) cardsPlayed = new Vector();
        CardList cardsPlayedList = new CardList();

        for (int t = 0; t <cardsPlayed.size(); t++)
        {
View Full Code Here

Examples of csa.jportal.ai.AIPlayer

    public void doSelectUntappedCreature(Communication c)
    {
        int debugLevel = 3;
        E.D.addLog("EAI: Enter com select target untapped creature!",debugLevel);
        AIPlayer aiPlayer = E.player.getAIPlayer();
        String baseKey=E.match.getPlayerBaseKey(E.player);

        Card card = c.E.mInitiatorCard;
        E.D.addLog("Script combo loaded ->",debugLevel);
View Full Code Here

Examples of csa.jportal.ai.AIPlayer

    public void doSelectTappedCreature(Communication c)
    {
        int debugLevel = 3;
        E.D.addLog("EAI: Enter com select tapped creature!",debugLevel);
        Card card = c.E.mInitiatorCard;
        AIPlayer aiPlayer = E.player.getAIPlayer();
        String baseKey=E.match.getPlayerBaseKey(E.player);
        //#import "scripts\Allround\AIHelperScript.java"

        E.D.addLog("Script combo loaded ->",debugLevel);
View Full Code Here

Examples of csa.jportal.ai.AIPlayer

    public void doSelectAttackingCreature(Communication c)
    {
        int debugLevel = 3;
        E.D.addLog("EAI: Enter com select attacking target creature!",debugLevel);
        AIPlayer aiPlayer = E.player.getAIPlayer();
        String baseKey=E.match.getPlayerBaseKey(E.player);
        //#import "scripts\Allround\AIHelperScript.java"

        Card card = c.E.mInitiatorCard;
        CardList opponentList = AIHelper.getPossibleCardList(E.player, E.match, CardAsking.createAttackingCreatureOpponentCreature(E.player, E.opponent));
View Full Code Here

Examples of csa.jportal.ai.AIPlayer

    public void doSelectCreature(Communication c)
    {
        int debugLevel=3;
        E.D.addLog("EAI: Enter com select target creature!",debugLevel);

        AIPlayer aiPlayer = E.player.getAIPlayer();
        String baseKey=E.match.getPlayerBaseKey(E.player);
        Card card = c.E.mInitiatorCard;

        //#import "scripts\Allround\AIHelperScript.java"
View Full Code Here

Examples of csa.jportal.ai.AIPlayer

    public void doSelectCreatureFromGrave(Communication c)
    {
        int debugLevel = 3;
        E.D.addLog("EAI: Enter com select creature from graveyard!",debugLevel);

        AIPlayer aiPlayer = E.player.getAIPlayer();
        String baseKey=E.match.getPlayerBaseKey(E.player);
        //#import "scripts\Allround\AIHelperScript.java"

        Card card = c.E.mInitiatorCard;
        CardList playerList = AIHelper.getPossibleCardList(E.player, E.match, CardAsking.createCreaturePlayerGraveyard(E.player, E.opponent));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.