Card game

Hello, I need some assistance with my program. I have not started it. I am a little confuse

Input: there will be 5 lines of input. Each line will contain the opponent lead card and 5 cards held by the dealer. All cards will be represented by two characters in value suit order


Strategy that use to determine card that dealer be playing with.
1)must play a card of the same suit (like spades)
2)he play lowest card in suit that is of higher rank than opponent
3)IF dealer does not have such card, he play the lowest


*If no card can be played the output should say “no card”
Other info:
Players: 2
Deck: 36 pack
Suits: Club, diamond, spades & heart
Card number: 1-9


Example:
INPUT:
1.5D, 2D, 6H, 9D, 9S, 6H // (5D-2D-9D )
2.9S, 8H, 7C, 7D, 9H, 3H //(9S CAN BE PLAYED)
3.2H, 4H, S7, 4D, S4, 3H //(2H-4H-3H)
COUNSEL:
1.9D
2.NO CARD
3.3H

Thank you in advance.
Last edited on
Hello,
I'm sorry if I'm wrong of your intentions, but may I remind you giving or receiving specific help on an ACSL challenge is prohibited. I would recommend finding a solution to your problem through research, learning by yourself is the best way to learn, at least in my opinion. Asking for help on these challenges is a slippery slope and I urge you not to continue on this path. However, I would be glad to assist you on less specific questions.

Topic archived. No new replies allowed.