card

I am trying to deal a deck of 52 playing cards amongst 4 players equally, meaning they will each have 13 cards each. Can only deal cards 4 each

我与影子孤独终老i 提交于 2020-12-15 05:15:42
问题 I am trying to deal a deck of 52 playing cards amongst 4 players equally, meaning they will each have 13 cards each. I can only seem to deal 4 cards each and i'm not sure why. Any help would be great. I have also attached an image of the output : OUTPUT public void deals() { for (int i = 0; i < 4; i++) { System.out.println("** Player " + (i + 1) + " has been dealt the following cards: **"); for (int j = 0; j <4; j++) { //System.out.println(ranks[i + j * 4] + " of " + suits[j]); System.out

I am trying to deal a deck of 52 playing cards amongst 4 players equally, meaning they will each have 13 cards each. Can only deal cards 4 each

帅比萌擦擦* 提交于 2020-12-15 05:15:00
问题 I am trying to deal a deck of 52 playing cards amongst 4 players equally, meaning they will each have 13 cards each. I can only seem to deal 4 cards each and i'm not sure why. Any help would be great. I have also attached an image of the output : OUTPUT public void deals() { for (int i = 0; i < 4; i++) { System.out.println("** Player " + (i + 1) + " has been dealt the following cards: **"); for (int j = 0; j <4; j++) { //System.out.println(ranks[i + j * 4] + " of " + suits[j]); System.out