FIX:
cards[Card.getCardIndex(Card.getCardValue(declaredValueIndex), suit)]
->
hasCard(Card.getCardIndex(valuesInGame.get(declaredValueIndex), suit)