Okay, first of all, I'm working on a card game called Tong-its. I created my own way of handling cards and I din't used the default cards plugin for reasons that I'm not exactly sure how it works and I guess it's not fully documented.
Anyway, here's how it goes: the code
What it basically does is top deal cards into each player one by one..36 times...to 2 players which means each should get 12 cards and the deck will be left with 16 cards.
the top card in the list(deck) is taken out and put to the player who should receive it
the counting variable in the loop is the one who cycles throught the players where the card should be given..so it's basically a normal dealing of cards- turn by turn.
The problem is that.. I don't know what the problem is..
Because the output is:
When it should look like:
The only hypotheses I got is that the Looping is not exactly working or I have misused it..It seemed to run well for the first time but it somehow fail to include in the loop the nesting if statements..In the debug, the whoseTurn had the final value 36 which is the total number of loops, however, it must have not been so because there is an if that checks the value of whoseTurn..
Pls. take time in solving this, and I tried I really tried, and out of frusttration, i decided to post it here for some help from other users.