first of all I am very new. Only 3 weeks into a very intensive course.
Secondly this will be very long. I appologize in advance. Thanks for your patience!
We were tasked with writing a very simple - no stratagy - card game. The rules are as follow: first playr picks a random card and attacks the next one who has to respond with a higher card of the same suit ("match"). If he succeeds both cards are discarded, otherwise the defender picks up the attacking card and forfeits his turn to attack player 3. First player of 4 to drop all cards wins. This must go on for up to 20 rounds.
The cards must be displayed in the bu suit and in ascending fashion like so:
Diamonds: 2, 5, 8, K, A
Clubs: 3, 5, Q..
Etc. And must remain sorted at all times.

I have a number of problems I cannot figure out:
1. I'm trying to print all players "hands" (all the cards he has) at the end of each round (full circle from player 1 to 4). For some reason it sometimes does and sometimes doesn't and there doesn't seem to be a clear pattern. After 10th round it does work.. **
2. During each "match" I wnt to print the outcome. I've succeeded except that in one case - if player 4 attacks player 1, for some reason player 1's name doesn't appear. **
3. this cannot be seen in a pleayer's hand - only when looking at all the "matches": even though there are 4 suits (which I've ENUMed but don't know how to actually print the ENUM so I represent them by number 1-4) once or twice a game suddenly there is a card with the suit number 65... **

** it's much easier to understand if you run the code..

I'm posting all my code for this purpose and I appologize for the length. Because I didn't want to post an extremely long post I used a website to save the pieces of code:

Here are the links:

Main:
File #tpqxai41-27542 | sourcepod.com
Signatures:
File #mombhh61-27545 | sourcepod.com
Functions:
File #amkgud88-27546 | sourcepod.com

Thanks a lot!!