Package csa.jportal.match

Examples of csa.jportal.match.MatchPlayable


    }

    public int computeScore()
    {
        int ret =0;
        MatchPlayable p = vMatch.getPlayer(playerNo);
        CardList deck = p.getDeck();
        if (deck == null) return 0;
        int colorNeeded = deck.getColorCount();
        int colorsGot = lands.getColorCount();

        int colorsPerdec = (colorsGot *10 ) / colorNeeded;
View Full Code Here


  public int buildScore(VirtualMatch match, int playerNo, boolean remember)
  {
      int ret = 0;
      if (playerNo==0)
      {
          MatchPlayable p = match.getPlayer(playerNo);
          os0 = new OneScore(scorer.length);
          for (int i = 0; i < scorer.length; i++)
          {
              Scorable oneScore = scorer[i];
              oneScore.setData(match, playerNo);
              int s = oneScore.computeScore();
              os0.lastScoreUnweighted[i] = s;
              s *= scoreWeighting[i];
              ret += s;
              os0.lastScoreWeighted[i] = s;
          }
          ret += match.getAdditionalScore();
          os0.overallScore = ret;

          if (remember)
          {
              if (playerNo == 0)
                p0.addElement(os0);
              else
                p1.addElement(os0);
          }
          return ret;
      }
      MatchPlayable p = match.getPlayer(playerNo);
      os1 = new OneScore(scorer.length);
      for (int i = 0; i < scorer.length; i++)
      {
          Scorable oneScore = scorer[i];
          oneScore.setData(match, playerNo);
View Full Code Here

              if ((stackCard.isSorcery()) || (stackCard.isInstant()))
              {
                  possibleInstant = AIHelper.onlyWithHint(possibleInstant, "INSTANT_WHEN_OPPONENT_SORCERY_PLAYED");

                  // dont negate own spells!
                  MatchPlayable ow = E.match.getOwner(stackCard);
                  int owNo = E.match.getMyNumber(ow);
                  int myNo = E.match.getMyNumber(E.player);
                  if (owNo == myNo)
                  {
                        possibleInstant =  AIHelper.removeWithHint(possibleInstant, "INSTANT_NEGATES_INSTANT_NEGATES_SORCERY");
View Full Code Here

       final MatchStartOptions options = new MatchStartOptions();

       if (hplayer != null)
       {
           // human game
            MatchPlayable hplayer1=null;
            hplayer.setBoosterMode(true, player1.mDeckBase);
            hplayer1 = new MatchHumanPlayer(hplayer);

            options.setPlayer1(hplayer1);
            options.setPlayer2(cplayer1);
View Full Code Here

    }

    public void checkQuestAfterGame(Match match, boolean win)
    {
        Logable D = Configuration.getConfiguration().getDebugEntity();
        MatchPlayable p = match.getPlayer(1);
        MatchComputerPlayer cplayer = null;
        if (p instanceof MatchComputerPlayer) cplayer = (MatchComputerPlayer)p; else return;

        QuestDefinitionDataPool mQuestDefinitionDataPool = new QuestDefinitionDataPool();
View Full Code Here

TOP

Related Classes of csa.jportal.match.MatchPlayable

Copyright © 2018 www.massapicom. 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.