public String getThreeOfAKind()
    {
        String stt = "0";

        //search for groups of 3 neighbouring cards that have the same rank

        if (cards[0].getRank() == cards[1].getRank() && cards[1].getRank() == cards[2].getRank()) {
            stt = Character.toString (cards[0].getCharCard()) + cards[3].getCharCard() + cards[4].getCharCard();

            return stt;
        }
        
        if (cards[1].getRank() == cards[2].getRank() && cards[2].getRank() == cards[3].getRank()) {
            stt = Character.toString(cards[1].getCharCard()) + cards[0].getCharCard() + cards[4].getCharCard();
            
            return stt;
        }
        
        if (cards[2].getRank() == cards[3].getRank() && cards[3].getRank() == cards[4].getRank()) {
            stt = Character.toString(cards[2].getCharCard()) + cards[0].getCharCard() + cards[1].getCharCard();

            return stt;
        }

        return stt;
    }