SteamWar/FightSystem
Archiviert
13
1

HellsBells #275

Manuell gemergt
Lixfel hat 19 Commits von Hells_bells nach master 2021-06-25 07:17:45 +02:00 zusammengeführt
Nur Änderungen aus Commit 2c981f29ce werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -29,7 +29,7 @@ public class HellsBells {
EAST(1, 0, 0, false),
WEST(-1, 0, 0, false);
static final List<Direction> DIRECTIONS = Arrays.asList(values());
static final Direction[] DIRECTIONS = values();
int dx;
int dy;
@ -43,6 +43,10 @@ public class HellsBells {
this.zLength = zLength;
}
public static Direction getRandom() {
return Direction.DIRECTIONS[random.nextInt(Direction.DIRECTIONS.length)];
}
Direction other() {
switch (this) {
case NORTH:
@ -130,7 +134,7 @@ public class HellsBells {
}
public void drop() {
Direction direction = Direction.DIRECTIONS.get(random.nextInt(Direction.DIRECTIONS.size()));
Direction direction = Direction.getRandom();
AtomicInteger length = new AtomicInteger(10 + random.nextInt((direction.zLength ? zLength : xLength) - 10));
int width = 5 + random.nextInt(5);