Archiviert
13
0

tower-generator #6

Zusammengeführt
YoyoNow hat 16 Commits von tower-generator nach master 2023-09-23 21:29:06 +02:00 zusammengeführt
9 geänderte Dateien mit 28 neuen und 22 gelöschten Zeilen
Nur Änderungen aus Commit a1acde76fd werden angezeigt - Alle Commits anzeigen

Datei anzeigen

@ -58,6 +58,7 @@ public class WorldConfig {
public static final TowerGeneratorConfig TOWER_GENERATOR_CONFIG;
public static final List<WinCondition> WINCONDITIONS = new ArrayList<>();
static {
WINCONDITIONS.add(new LastRemainingWincondition());
WINCONDITIONS.add(new LastOutsideWincondition());

Datei anzeigen

@ -38,9 +38,13 @@ public abstract class Countdown extends GameStateToggleListener {
super(enabledStates);
}
int defaultTime() {return 0;}
int defaultTime() {
return 0;
}
void timerEnd() {}
boolean timerShouldCancel() {return true;}
boolean timerShouldCancel() {
return true;
}
void run() {}
void timerStart() {}
void timerReset() {}

Datei anzeigen

@ -32,7 +32,7 @@ public class EndCountdown extends Countdown {
private final LobbyCountdown lobbyCountdown;
private static boolean RESETS = Objects.requireNonNull(Bukkit.getWorlds().get(0).getWorldFolder().list((dir, name) -> name.equals("backup"))).length > 0;
private static final boolean RESETS = Objects.requireNonNull(Bukkit.getWorlds().get(0).getWorldFolder().list((dir, name) -> name.equals("backup"))).length > 0;
public EndCountdown(LobbyCountdown lobbyCountdown) {
super(EnumSet.of(GameStates.ENDING));

Datei anzeigen

@ -31,8 +31,8 @@ public class TowerGenerator {
YoyoNow markierte diese Unterhaltung als gelöst Veraltet
Veraltet
Review

Could be final,
Could be static

Could be final, Could be static
private static final Random random = new Random();
YoyoNow markierte diese Unterhaltung als gelöst Veraltet
Veraltet
Review

could be final

could be final
private final WorldConfig.TowerGeneratorConfig config;
YoyoNow markierte diese Unterhaltung als gelöst Veraltet
Veraltet
Review

Attribute sind im camelCase

Attribute sind im camelCase
private List<SchematicNode> allSchematics;
private Clipboard roof;
private final List<SchematicNode> allSchematics;
private final Clipboard roof;
@Getter
private int height;

Datei anzeigen

@ -48,7 +48,7 @@ import java.util.*;
public class IngameListener extends GameStateBukkitListener {
private int time = 0;
private Map<Integer, List<Block>> blocksToMelt = new HashMap<>();
private final Map<Integer, List<Block>> blocksToMelt = new HashMap<>();
private BukkitRunnable runnable;
public IngameListener() {

Datei anzeigen

@ -34,6 +34,7 @@ public abstract class GameStateToggleListener extends GameStateListener {
}
public abstract void enable();
public abstract void disable();
@Override