Skip to content

TriPeaks card reveal might hit the last card but not able to read #32

@activex88

Description

@activex88

Thanks for your great work!

While playing with TriPeaks, it encountered an issue of hitting the last card but not able to read the card.
Please see the video upload to Youtube: https://youtu.be/pPyYPN7aS04

The card file is attached as a reference:

tripeakscards20230108120036.txt

May be there is a fix on TriPeaksPlayer.java as,

private List<String> scanCardsOnScreen(TriPeaksWindow window) throws InterruptedException, PlayException {
    window.undoBoard();
    List<String> cards = new ArrayList<>();
    for (int i = 0; i < 28; i++) {
        cards.add(window.cardAtTableau(i));
    }
    cards.add(window.cardAtWaste());
    for (int i = 0; i < 22; i++) {
        window.draw();
        cards.add(window.cardAtWaste());
    }
    cards.add("??");
    return cards;
}

protected boolean isValidCards(List<String> cards,
                               List<String> missing,
                               List<String> duplicates,
                               List<String> malformed,
                               long numUnknownCards) {
    return ((cards.size() == 52) &&
            (0 <= missing.size()) &&
            (missing.size() <= 19) &&
            (duplicates.size() == 0) &&
            (malformed.size() == 0) &&
            (0 <= numUnknownCards) &&
            (numUnknownCards <= 19));
}

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions