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);
}
}