Skip to content

Commit

Permalink
update CitadelsUtils
Browse files Browse the repository at this point in the history
  • Loading branch information
aprilywy committed Dec 8, 2023
1 parent a6ade15 commit ad88df6
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 28 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package tw.waterballsa.gaas.citadels.spring.util;

import java.util.Random;

public class CitadelsUtils {
static void shuffle(Object[] List, int cards) {
Random rd = new Random();

for (int i = cards - 1; i > 0; i--) {
int j = rd.nextInt(i+1);

Object temp = List[i];
List[i] = List[j];
List[j] = temp;
}
}
}

This file was deleted.

0 comments on commit ad88df6

Please sign in to comment.