Examples of ByteLocation


Examples of com.barrybecker4.common.geometry.ByteLocation

        Point point = argument.m_point;

        if (point != null)  {
            boolean isBlack = controller_.getCurrentPlayer().equals(controller_.getPlayers().getPlayer1());
            GoMove move = new GoMove(new ByteLocation(point.getX()+1, point.getY()+1)0, new GoStone(isBlack));
            controller_.manMoves(move);
        }
        return true;
    }
View Full Code Here

Examples of com.barrybecker4.common.geometry.ByteLocation

    /**
     * factory method for creating a passing move
     * @return new passing move
     */
    public static GoMove createPassMove(int val, boolean player1) {
        GoMove m = new GoMove(new ByteLocation(1, 1), val, null );
        m.isPass_ = true;
        m.setPlayer1(player1);
        return m;
    }
View Full Code Here

Examples of com.barrybecker4.common.geometry.ByteLocation

    /**
     * factory method for creating a resignation move
     * @return new resignation move
     */
    public static GoMove createResignationMove(boolean player1) {
        GoMove m = new GoMove( new ByteLocation(1, 1), 0, null );
        m.isResignation_ = true;
        m.setPlayer1(player1);
        return m;
    }
View Full Code Here

Examples of com.barrybecker4.common.geometry.ByteLocation

        for (int i = 1; i <= nCols; i++ )  {
            for (int j = 1; j <= nRows; j++ )  {
                // if its a candidate move and not an immediate take-back (which would break the rule of ko)
                if ( candidateMoves.isCandidateMove( j, i ) && !isTakeBack( j, i, (GoMove) lastMove, board ) ) {
                    GoMove m = new GoMove( new ByteLocation(j, i), lastMoveValue, new GoStone(player1) );

                    if ( m.isSuicidal(board) ) {
                        GameContext.log(3, "The move was a suicide (can't add it to the list): " + m);
                    }
                    else {
View Full Code Here

Examples of com.barrybecker4.common.geometry.ByteLocation

        boolean player1 = token instanceof AddBlackToken;

        while (points.hasNext()) {
            Point point = points.next();
            //System.out.println("adding move at row=" + point.y+" col="+ point.x);
            moveList.add( new GoMove( new ByteLocation(point.y, point.x), 0, new GoStone(player1)));
        }
    }
View Full Code Here

Examples of com.barrybecker4.common.geometry.ByteLocation

          MoveToken mvToken = (MoveToken) token;
          if (mvToken.isPass()) {
              return GoMove.createPassMove(0, !mvToken.isWhite());
          }
          return new GoMove(
                  new ByteLocation(mvToken.getY(), mvToken.getX()),
                  0, new GoStone(!mvToken.isWhite()));
    }
View Full Code Here

Examples of com.barrybecker4.common.geometry.ByteLocation

        float totalPotential = 0;
        RunPotentialAnalyzer runAnalyzer = new RunPotentialAnalyzer(groupString, board_, analyzerMap_);

        for ( int r = rMin; r <= rMax; r++ ) {
            totalPotential += runAnalyzer.getRunPotential(new ByteLocation(r, cMin), 0, 1, rMax, cMax);
        }
        return totalPotential;
    }
View Full Code Here

Examples of com.barrybecker4.common.geometry.ByteLocation

        float totalPotential = 0;
        RunPotentialAnalyzer runAnalyzer = new RunPotentialAnalyzer(groupString, board_, analyzerMap_);

        for ( int c = cMin; c <= cMax; c++ ) {
            totalPotential += runAnalyzer.getRunPotential(new ByteLocation(rMin, c), 1, 0, rMax, cMax);
        }
        return totalPotential;
    }
View Full Code Here

Examples of com.barrybecker4.common.geometry.ByteLocation

     * The pot will be drawn in the middle of the table.
     */
    @Override
    protected void drawMarkers(Board board, PlayerList players, Graphics2D g2  ) {

        Location loc = new ByteLocation(board.getNumRows() >> 1, (board.getNumCols() >> 1) - 3);
        int pot = ((PokerTable)board).getPotValue();
        new ChipRenderer().render(g2, loc, pot, this.getCellSize());

        // now draw the players and their stuff (face, name, chips, cards, etc)
        super.drawMarkers(board, players, g2);
View Full Code Here

Examples of com.barrybecker4.common.geometry.ByteLocation

        this.setPreferredSize(new Dimension(400, 120));
    }

    @Override
    protected void paintComponent(Graphics g) {
         handRenderer.render((Graphics2D) g, new ByteLocation(0, 2), hand_, 22);
    }
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.