SteamWar/MissileWars
Archiviert
13
0

Update1.0 #11

Geschlossen
YoyoNow möchte 11 Commits von Update1.0 nach master mergen
Nur Änderungen aus Commit 2a0b316608 werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -187,8 +187,7 @@ public class Missile extends SpecialItem {
File[] files = missileFolder.listFiles(); File[] files = missileFolder.listFiles();
if (files == null) return; if (files == null) return;
if (files.length < Config.MissileCount) return; if (files.length < Config.MissileCount) return;
List<File> pool = new ArrayList<>(files.length); List<File> pool = new ArrayList<>(Arrays.asList(files));
pool.addAll(Arrays.asList(files));
for (int i = 0; i < Config.MissileCount; i++) { for (int i = 0; i < Config.MissileCount; i++) {
File missileFile = pool.remove(r.nextInt(pool.size())); File missileFile = pool.remove(r.nextInt(pool.size()));