1
0
mirror of https://github.com/Klagarge/PokeHES.git synced 2025-07-17 21:31:10 +00:00
This commit is contained in:
2022-06-16 22:09:17 +02:00
parent 12ccf3f58a
commit bb02aa00f9
5 changed files with 6 additions and 27 deletions

View File

@ -1,11 +1,9 @@
package Text;
import java.util.Vector;
import Entity.Enemy;
import Entity.Character.Direction;
import java.text.Normalizer;
import java.util.Vector;
import java.util.Arrays;
import java.util.Random;
@ -59,13 +57,13 @@ public class TextEnemy {
// Creating object for Random class
Random rd = new Random();
// Starting from the last element and swapping one by one.
for (int i = a.length-1; i > 0; i--) {
// Pick a random index from 0 to i
int j = rd.nextInt(i+1);
// Swap array[i] with the element at random index
int temp = a[i];
a[i] = a[j];