public int rank(Move move) {
        Chess.TIMER.start(Part.RankMove);

        try {
            Piece piece = board.get(move.getTo());
            if(piece == null) {
                return 0;
            }

            switch(piece.type) {
                case King:
                    return Integer.MAX_VALUE;
                case Queen:
                    return 50;
                case Bishop:
                case Rook:
                case Knight:
                    return 20;
                case Pawn:
                    return 5;
            }

            throw new AssertionError();
        } finally {
            Chess.TIMER.stop();
        }
    }