Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>
- /// Every player will give their hand to the next player
- /// </summary>
- public void PassHandsUp() {
- int j;
- int k = 0;
- // if we push the 0th hand to the correct position, the offset
- // will move the others into the correct spot as well
- for (int i = 0; i < Players.Length - 1; i++) {
- j = k;
- if (Clockwise) {
- if (j == Players.Length - 1) break; // we're done
- if (k == Players.Length - 1) k = 0;
- else k++;
- SwapHands(Players[j], Players[k]);
- }
- else {
- if (j == 1) break; // we're done
- if (k == 0) k = Players.Length - 1;
- else k--;
- SwapHands(Players[j], Players[k]);
- }}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement