diff options
| author | Andriy Cherniy <qugalet@m0e.space> | 2024-06-17 05:10:58 +0300 |
|---|---|---|
| committer | Andriy Cherniy <qugalet@m0e.space> | 2024-06-17 05:10:58 +0300 |
| commit | 943bc45a13256d57c82ed58f22aa2cb802292744 (patch) | |
| tree | ada8c6d5eefa3e4034504bfcc5eb03ab84597ebe /src/main/java/space/m0e/quga/oop/lab56maven/Main.java | |
| parent | 3401d742ca53dce6bb1464cc12f94d107cfc285d (diff) | |
| download | oop-kursach-943bc45a13256d57c82ed58f22aa2cb802292744.tar.gz oop-kursach-943bc45a13256d57c82ed58f22aa2cb802292744.zip | |
Diffstat (limited to 'src/main/java/space/m0e/quga/oop/lab56maven/Main.java')
| -rw-r--r-- | src/main/java/space/m0e/quga/oop/lab56maven/Main.java | 68 |
1 files changed, 52 insertions, 16 deletions
diff --git a/src/main/java/space/m0e/quga/oop/lab56maven/Main.java b/src/main/java/space/m0e/quga/oop/lab56maven/Main.java index 65a0f5d..17b1e0f 100644 --- a/src/main/java/space/m0e/quga/oop/lab56maven/Main.java +++ b/src/main/java/space/m0e/quga/oop/lab56maven/Main.java @@ -36,10 +36,7 @@ import space.m0e.quga.oop.lab56maven.handlers.DwarfHandler; import space.m0e.quga.oop.lab56maven.handlers.ImmigrantHandler; import java.io.*; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.Iterator; -import java.util.List; +import java.util.*; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; @@ -54,8 +51,8 @@ public class Main extends Application { public static MiniMap miniMap; - public static final double width = 3555; - public static final double height = 2000; + public static final double width = 5000; + public static final double height = 2812; public static ImageView imgviewmap; public static Rectangle rectMinimap; @@ -68,29 +65,68 @@ public class Main extends Application { fileChooser.setInitialFileName("serial.csv"); root.getChildren().add(rect); - Fortress fortress = new Fortress("Eartha", 150, 150, + + fortresses.add(new Fortress("Eartha", 150, 150, new ArrayList<>(List.of( new Workstation("Torgrus", Ability.MASONIST), new Workstation("Abbacus", Ability.WOODCUTTER) )), new ArrayList<>(List.of( new ThroneRoom("Halzorga")) - )); - - Fortress fortressTrade = new Fortress("Aboba", 1000, 150, + ))); + fortresses.add(new Fortress("Aboba", 1000, 150, new ArrayList<>(List.of( new Workstation("Torgrass", Ability.WOODCUTTER) )), new ArrayList<>(List.of( + )))); + + fortresses.add(new Fortress("Eldoria", 2300, 500, + new ArrayList<>(List.of( + new Workstation("Eldoria Workstation", Ability.MASONIST) + )), + new ArrayList<>(List.of( + new ThroneRoom("Eldoria Throne Room")) ))); - fortresses.add(fortressTrade); - fortresses.add(fortress); - fortressTrade.setWoodCount(999); + fortresses.add(new Fortress("Valeria", 800, 1600, + new ArrayList<>(List.of( + new Workstation("Valeria Workstation", Ability.WOODCUTTER) + )), + new ArrayList<>(List.of( + new ThroneRoom("Valeria Throne Room")) + ))); + fortresses.add(new Fortress("Dunewood", 2700, 2100, + new ArrayList<>(List.of( + new Workstation("Dunewood Workstation", Ability.MASONIST) + )), + new ArrayList<>(List.of( + new ThroneRoom("Dunewood Throne Room")) + ))); + fortresses.add(new Fortress("Glimmerstone", 3300, 200, + new ArrayList<>(List.of( + new Workstation("Glimmerstone Workstation", Ability.WOODCUTTER) + )), + new ArrayList<>(List.of( + new ThroneRoom("Glimmerstone Throne Room")) + ))); + fortresses.add(new Fortress("Stormwatch", 4000, 1000, + new ArrayList<>(List.of( + new Workstation("Stormwatch Workstation", Ability.MASONIST) + )), + new ArrayList<>(List.of( + new ThroneRoom("Stormwatch Throne Room")) + ))); + + fortresses.get(0).setWoodCount(1000); + fortresses.get(1).setStoneCount(1000); -// immigrants.add(new Immigrant("Melbil", "Lancerpaddle", 50, 100,100, Ability.WOODCUTTER)); -// immigrants.add(new Immigrant("Atír", "Razorpaddle", 50, 0,0, Ability.WOODCUTTER)); -// immigrants.add(new Immigrant("Onget", "Sabreletter", 52, 200,150, Ability.WOODCUTTER)); + immigrants.add(new Immigrant("Melbil", "Lancerpaddle", 50, 0,50, Ability.COMMUNICATION)); + immigrants.add(new Immigrant("Atír", "Razorpaddle", 50, 0,50, Ability.COMMUNICATION)); + immigrants.add(new Immigrant("Onget", "Sabreletter", 52, 200,140, Ability.MASONIST)); immigrants.add(new Immigrant("Limul", "Rockrack", 52, 700,150, Ability.WOODCUTTER)); +// for (int i = 0; i < 20; i++) { +// immigrants.add(new Immigrant()) +// } root.getChildren().add(status); group.getChildren().add(root); |
