Examples of PieceMoveSet


Examples of org.darkhelm.dragonchess.server.piece.PieceMoveSet

        if (bPiece == null || bPiece.getTeam() != team) {
          continue;
        }
        PieceDef pDef = PieceDef.get(bPiece.getType());

        PieceMoveSet moves = pDef.getMoves(getType());

        long hash = Zobrist.getHash(getType(), team, horiz, vert,
            bPiece.getType());

        Piece piece = new Piece(hash, bPiece.getType(), team,
            pDef.getValue());

        if (getSet().isFrozen(getType(), horiz, vert)) {
          piece.addMove(new Move(getSet().hash(), 0, getType(),
              horiz, vert, MoveTypes.FREEZE));
        } else {
          piece.addAllMoves(moves.getMoves(team, this, horiz, vert));
        }

        pieceMap.put(Position.create(getType(), horiz, vert), piece);
      }
    }
View Full Code Here

Examples of org.darkhelm.dragonchess.server.piece.PieceMoveSet

        if (bPiece == null || bPiece.getTeam() != team) {
          continue;
        }
        PieceDef pDef = PieceDef.get(bPiece.getType());

        PieceMoveSet moves = pDef.getMoves(getType());

        moveList.addAll(moves.getCheckMoves(team, this, horiz, vert));
      }
    }

    Collections.sort(moveList, new Comparator<Move>() {
      @Override
View Full Code Here

Examples of org.darkhelm.dragonchess.server.piece.PieceMoveSet

        Teams team = bPiece.getTeam();

        PieceDef pDef = PieceDef.get(bPiece.getType());

        PieceMoveSet moves = pDef.getMoves(getType());

        freezeList.addAll(moves.getFrozenLocations(team, this, horiz,
            vert));
      }
    }

    return freezeList;
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.