From cabfdd425235a1c30ff46e82ae3be88fcb3519f9 Mon Sep 17 00:00:00 2001 From: Tassilo Schweyer Date: Fri, 5 Jun 2026 19:18:49 +0200 Subject: [PATCH] initial --- nb-configuration.xml | 18 ++++ pom.xml | 37 +++++++++ .../de/welterde/em/CollisionException.java | 41 +++++++++ .../java/de/welterde/em/Exotic_matter.java | 16 ++++ .../de/welterde/em/data/BuildingManager.java | 25 ++++++ .../java/de/welterde/em/data/CoordVector.java | 25 ++++++ .../java/de/welterde/em/data/Corridor.java | 25 ++++++ .../java/de/welterde/em/data/CounterName.java | 26 ++++++ .../java/de/welterde/em/data/Direction.java | 48 +++++++++++ src/main/java/de/welterde/em/data/Entity.java | 43 ++++++++++ .../java/de/welterde/em/data/EntityBase.java | 25 ++++++ .../de/welterde/em/data/EntityPosMgr.java | 34 ++++++++ .../java/de/welterde/em/data/EntityType.java | 30 +++++++ .../java/de/welterde/em/data/Location.java | 26 ++++++ .../de/welterde/em/data/LocationBase.java | 37 +++++++++ .../de/welterde/em/data/LocationManager.java | 34 ++++++++ .../java/de/welterde/em/data/MapCoord.java | 44 ++++++++++ .../de/welterde/em/data/MovementStatus.java | 30 +++++++ .../java/de/welterde/em/data/OutpostMap.java | 57 +++++++++++++ src/main/java/de/welterde/em/data/Room.java | 25 ++++++ .../java/de/welterde/em/data/RoomCoord.java | 25 ++++++ .../java/de/welterde/em/data/TerrainGen.java | 25 ++++++ src/main/java/de/welterde/em/data/Tile.java | 47 +++++++++++ .../java/de/welterde/em/data/TileImpl.java | 83 +++++++++++++++++++ .../java/de/welterde/em/data/TileType.java | 32 +++++++ .../welterde/em/data/gen/BasicTerrainGen.java | 42 ++++++++++ .../de/welterde/em/data/gen/OutpostGen.java | 25 ++++++ src/main/java/de/welterde/em/e/Employee.java | 30 +++++++ src/main/java/de/welterde/em/e/Skill.java | 25 ++++++ .../de/welterde/em/entity/EntityManager.java | 32 +++++++ .../java/de/welterde/em/entity/ItemBase.java | 27 ++++++ .../java/de/welterde/em/room/RoomType.java | 27 ++++++ src/main/java/de/welterde/em/w/City.java | 25 ++++++ src/main/java/de/welterde/em/w/Country.java | 25 ++++++ src/main/java/de/welterde/em/w/Dimension.java | 25 ++++++ .../java/de/welterde/em/w/DimensionType.java | 32 +++++++ src/main/java/de/welterde/em/w/Org.java | 25 ++++++ src/main/java/de/welterde/em/w/Outpost.java | 31 +++++++ .../java/de/welterde/em/w/OutpostFlags.java | 41 +++++++++ .../de/welterde/em/w/OutpostLocationType.java | 40 +++++++++ src/main/java/de/welterde/em/w/World.java | 25 ++++++ 41 files changed, 1335 insertions(+) create mode 100644 nb-configuration.xml create mode 100644 pom.xml create mode 100644 src/main/java/de/welterde/em/CollisionException.java create mode 100644 src/main/java/de/welterde/em/Exotic_matter.java create mode 100644 src/main/java/de/welterde/em/data/BuildingManager.java create mode 100644 src/main/java/de/welterde/em/data/CoordVector.java create mode 100644 src/main/java/de/welterde/em/data/Corridor.java create mode 100644 src/main/java/de/welterde/em/data/CounterName.java create mode 100644 src/main/java/de/welterde/em/data/Direction.java create mode 100644 src/main/java/de/welterde/em/data/Entity.java create mode 100644 src/main/java/de/welterde/em/data/EntityBase.java create mode 100644 src/main/java/de/welterde/em/data/EntityPosMgr.java create mode 100644 src/main/java/de/welterde/em/data/EntityType.java create mode 100644 src/main/java/de/welterde/em/data/Location.java create mode 100644 src/main/java/de/welterde/em/data/LocationBase.java create mode 100644 src/main/java/de/welterde/em/data/LocationManager.java create mode 100644 src/main/java/de/welterde/em/data/MapCoord.java create mode 100644 src/main/java/de/welterde/em/data/MovementStatus.java create mode 100644 src/main/java/de/welterde/em/data/OutpostMap.java create mode 100644 src/main/java/de/welterde/em/data/Room.java create mode 100644 src/main/java/de/welterde/em/data/RoomCoord.java create mode 100644 src/main/java/de/welterde/em/data/TerrainGen.java create mode 100644 src/main/java/de/welterde/em/data/Tile.java create mode 100644 src/main/java/de/welterde/em/data/TileImpl.java create mode 100644 src/main/java/de/welterde/em/data/TileType.java create mode 100644 src/main/java/de/welterde/em/data/gen/BasicTerrainGen.java create mode 100644 src/main/java/de/welterde/em/data/gen/OutpostGen.java create mode 100644 src/main/java/de/welterde/em/e/Employee.java create mode 100644 src/main/java/de/welterde/em/e/Skill.java create mode 100644 src/main/java/de/welterde/em/entity/EntityManager.java create mode 100644 src/main/java/de/welterde/em/entity/ItemBase.java create mode 100644 src/main/java/de/welterde/em/room/RoomType.java create mode 100644 src/main/java/de/welterde/em/w/City.java create mode 100644 src/main/java/de/welterde/em/w/Country.java create mode 100644 src/main/java/de/welterde/em/w/Dimension.java create mode 100644 src/main/java/de/welterde/em/w/DimensionType.java create mode 100644 src/main/java/de/welterde/em/w/Org.java create mode 100644 src/main/java/de/welterde/em/w/Outpost.java create mode 100644 src/main/java/de/welterde/em/w/OutpostFlags.java create mode 100644 src/main/java/de/welterde/em/w/OutpostLocationType.java create mode 100644 src/main/java/de/welterde/em/w/World.java diff --git a/nb-configuration.xml b/nb-configuration.xml new file mode 100644 index 0000000..98cd079 --- /dev/null +++ b/nb-configuration.xml @@ -0,0 +1,18 @@ + + + + + + gpl30 + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..3ebd2a0 --- /dev/null +++ b/pom.xml @@ -0,0 +1,37 @@ + + + 4.0.0 + de.welterde.em + exotic_matter + 1.0-SNAPSHOT + jar + + UTF-8 + 25 + de.welterde.em.Exotic_matter + + + + + false + + central + Maven Repository Switchboard + https://repo1.maven.org/maven2 + + + + + + + never + + + false + + central + Maven Plugin Repository + https://repo1.maven.org/maven2 + + + \ No newline at end of file diff --git a/src/main/java/de/welterde/em/CollisionException.java b/src/main/java/de/welterde/em/CollisionException.java new file mode 100644 index 0000000..c211728 --- /dev/null +++ b/src/main/java/de/welterde/em/CollisionException.java @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em; + +/** + * + * @author welterde + */ +public class CollisionException extends RuntimeException { + + /** + * Creates a new instance of CollisionException without detail + * message. + */ + public CollisionException() { + } + + /** + * Constructs an instance of CollisionException with the + * specified detail message. + * + * @param msg the detail message. + */ + public CollisionException(String msg) { + super(msg); + } +} diff --git a/src/main/java/de/welterde/em/Exotic_matter.java b/src/main/java/de/welterde/em/Exotic_matter.java new file mode 100644 index 0000000..3b6498e --- /dev/null +++ b/src/main/java/de/welterde/em/Exotic_matter.java @@ -0,0 +1,16 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + */ + +package de.welterde.em; + +/** + * + * @author welterde + */ +public class Exotic_matter { + + public static void main(String[] args) { + System.out.println("Hello World!"); + } +} diff --git a/src/main/java/de/welterde/em/data/BuildingManager.java b/src/main/java/de/welterde/em/data/BuildingManager.java new file mode 100644 index 0000000..973c5e1 --- /dev/null +++ b/src/main/java/de/welterde/em/data/BuildingManager.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +/** + * Manage presence of rooms, walls, corridors, etc. + * @author welterde + */ +public class BuildingManager { + +} diff --git a/src/main/java/de/welterde/em/data/CoordVector.java b/src/main/java/de/welterde/em/data/CoordVector.java new file mode 100644 index 0000000..aadf137 --- /dev/null +++ b/src/main/java/de/welterde/em/data/CoordVector.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +/** + * + * @author welterde + */ +public record CoordVector(short dz, short dx, short dy) { + +} diff --git a/src/main/java/de/welterde/em/data/Corridor.java b/src/main/java/de/welterde/em/data/Corridor.java new file mode 100644 index 0000000..b283407 --- /dev/null +++ b/src/main/java/de/welterde/em/data/Corridor.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +/** + * + * @author welterde + */ +public final class Corridor extends LocationBase implements Location { + +} diff --git a/src/main/java/de/welterde/em/data/CounterName.java b/src/main/java/de/welterde/em/data/CounterName.java new file mode 100644 index 0000000..f70c076 --- /dev/null +++ b/src/main/java/de/welterde/em/data/CounterName.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +/** + * + * @author welterde + */ +public enum CounterName { + LOCATION_IDX, + ENTITY_IDX, +} diff --git a/src/main/java/de/welterde/em/data/Direction.java b/src/main/java/de/welterde/em/data/Direction.java new file mode 100644 index 0000000..b2ab30d --- /dev/null +++ b/src/main/java/de/welterde/em/data/Direction.java @@ -0,0 +1,48 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +/** + * + * @author welterde + */ +public enum Direction { + EAST, + WEST, + NORTH, + SOUTH, + UP, + DOWN; + + public static final CoordVector EAST_VEC = new CoordVector((short) 0, (short) 1, (short) 0); + public static final CoordVector WEST_VEC = new CoordVector((short) 0, (short) -1, (short) 0); + public static final CoordVector NORTH_VEC = new CoordVector((short) 0, (short) 0, (short) 1); + public static final CoordVector SOUTH_VEC = new CoordVector((short) 0, (short) 0, (short) -1); + public static final CoordVector UP_VEC = new CoordVector((short) 1, (short) 0, (short) 0); + public static final CoordVector DOWN_VEC = new CoordVector((short) -1, (short) 0, (short) 0); + + public CoordVector getNormVector() { + return switch(this) { + case EAST -> EAST_VEC; + case WEST -> WEST_VEC; + case NORTH -> NORTH_VEC; + case SOUTH -> SOUTH_VEC; + case UP -> UP_VEC; + case DOWN -> DOWN_VEC; + }; + } +} diff --git a/src/main/java/de/welterde/em/data/Entity.java b/src/main/java/de/welterde/em/data/Entity.java new file mode 100644 index 0000000..2fec36a --- /dev/null +++ b/src/main/java/de/welterde/em/data/Entity.java @@ -0,0 +1,43 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +/** + * + * @author welterde + */ +public interface Entity { + + /** + * Space occupied by entity. + * In case of small object with no bounding box return null. + * + * @return + */ + public Object getBoundingBox(); + + /** + * Get current location of object. + * + * @return + */ + public Location getLocation(); + + public boolean isMovable(); + + public MovementStatus getMovementStatus(); +} diff --git a/src/main/java/de/welterde/em/data/EntityBase.java b/src/main/java/de/welterde/em/data/EntityBase.java new file mode 100644 index 0000000..9d538a1 --- /dev/null +++ b/src/main/java/de/welterde/em/data/EntityBase.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +/** + * + * @author welterde + */ +public abstract class EntityBase implements Entity { + +} diff --git a/src/main/java/de/welterde/em/data/EntityPosMgr.java b/src/main/java/de/welterde/em/data/EntityPosMgr.java new file mode 100644 index 0000000..62839e4 --- /dev/null +++ b/src/main/java/de/welterde/em/data/EntityPosMgr.java @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +/** + * Manages position and occupied tiles by entities + * + * @author welterde + */ +public class EntityPosMgr { + protected final OutpostMap ctx; + + public EntityPosMgr(OutpostMap ctx) { + this.ctx = ctx; + } + + public void occupyTile(Tile t, Entity e) { + // do something + } +} diff --git a/src/main/java/de/welterde/em/data/EntityType.java b/src/main/java/de/welterde/em/data/EntityType.java new file mode 100644 index 0000000..e1a9215 --- /dev/null +++ b/src/main/java/de/welterde/em/data/EntityType.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +/** + * + * @author welterde + */ +public enum EntityType { + + SMALL_ITEM, + LARGE_ITEM, + + MACHINERY, + FURNITURE, +} diff --git a/src/main/java/de/welterde/em/data/Location.java b/src/main/java/de/welterde/em/data/Location.java new file mode 100644 index 0000000..e391732 --- /dev/null +++ b/src/main/java/de/welterde/em/data/Location.java @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +/** + * + * @author welterde + */ +public sealed interface Location permits LocationBase, Corridor, Room { + public short getSecurityLevel(); + public Location setSecurityLevel(short newLevel); +} diff --git a/src/main/java/de/welterde/em/data/LocationBase.java b/src/main/java/de/welterde/em/data/LocationBase.java new file mode 100644 index 0000000..ed48df9 --- /dev/null +++ b/src/main/java/de/welterde/em/data/LocationBase.java @@ -0,0 +1,37 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +/** + * + * @author welterde + */ +public abstract class LocationBase implements Location { + + protected short securityLevel; + + @Override + public short getSecurityLevel() { + return this.securityLevel; + } + + @Override + public Location setSecurityLevel(short newLevel) { + this.securityLevel = newLevel; + return this; + } +} diff --git a/src/main/java/de/welterde/em/data/LocationManager.java b/src/main/java/de/welterde/em/data/LocationManager.java new file mode 100644 index 0000000..0e649b8 --- /dev/null +++ b/src/main/java/de/welterde/em/data/LocationManager.java @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +/** + * Manages locations like rooms, corridors, sectors + * @author welterde + */ +public class LocationManager { + protected final OutpostMap ctx; + + public LocationManager(OutpostMap ctx) { + this.ctx = ctx; + } + + public Corridor buildCorridor(MapCoord startPos, Direction dir, short width, short height) { + var vec = dir.getNormVector(); + } + +} diff --git a/src/main/java/de/welterde/em/data/MapCoord.java b/src/main/java/de/welterde/em/data/MapCoord.java new file mode 100644 index 0000000..b7f711e --- /dev/null +++ b/src/main/java/de/welterde/em/data/MapCoord.java @@ -0,0 +1,44 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Record.java to edit this template + */ +package de.welterde.em.data; + +/** + * z coordinate goes from 65km to 0, where ground-level is at 50km + * @author welterde + */ +public record MapCoord(int z, int x, int y) { + + public MapCoord move(Direction dir) { + switch (dir) { + case EAST -> { + return new MapCoord(z, x + 1, y); + } + case WEST -> { + return new MapCoord(z, x - 1, y); + } + case NORTH -> { + return new MapCoord(z, x, y + 1); + } + case SOUTH -> { + return new MapCoord(z, x, y - 1); + } + case UP -> { + return new MapCoord(z - 1, x, y); + } + case DOWN -> { + return new MapCoord(z + 1, x, y); + } + } + return null; + } + + public boolean isUnderground() { + return (z < 50000); + } + + public MapCoord add(CoordVector v) { + return new MapCoord(z + v.dz(), x + v.dx(), y + v.dy()); + } +} diff --git a/src/main/java/de/welterde/em/data/MovementStatus.java b/src/main/java/de/welterde/em/data/MovementStatus.java new file mode 100644 index 0000000..003401c --- /dev/null +++ b/src/main/java/de/welterde/em/data/MovementStatus.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +/** + * + * @author welterde + */ +public enum MovementStatus { + /** + * Entity is fixed in place + */ + FIXED, + STATIONARY, + MOVING +} diff --git a/src/main/java/de/welterde/em/data/OutpostMap.java b/src/main/java/de/welterde/em/data/OutpostMap.java new file mode 100644 index 0000000..3e334df --- /dev/null +++ b/src/main/java/de/welterde/em/data/OutpostMap.java @@ -0,0 +1,57 @@ +/* + * Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license + * Click nbfs://nbhost/SystemFileSystem/Templates/Classes/Class.java to edit this template + */ +package de.welterde.em.data; + +import java.util.EnumMap; +import java.util.HashMap; +import java.util.Map; + +/** + * + * @author welterde + */ +public class OutpostMap { + + protected final Map tiles; + protected final Map locations; + protected final Map entities; + protected final EntityPosMgr entityPosMgr; + protected final TerrainGen gen; + protected final EnumMap counters; + + public OutpostMap(TerrainGen gen) { + this.tiles = new HashMap<>(); + this.locations = new HashMap<>(); + this.entities = new HashMap<>(); + this.counters = new EnumMap<>(CounterName.class); + this.gen = gen; + this.entityPosMgr = new EntityPosMgr(this); + } + + public Tile getTile(MapCoord c) { + if(!this.tiles.containsKey(c)) { + // default to the terrain generator + return this.gen.generateTile(this, c); + } else { + return this.tiles.get(c); + } + } + + public void updateTile(MapCoord c, Tile upd) { + this.tiles.put(c, upd); + } + + public int incrCounter(CounterName n) { + synchronized(this.counters) { + var nextVal = this.counters.get(n) + 1; + this.counters.put(n, nextVal); + return nextVal; + } + } + + public void occupyTile(Tile t, Entity e) { + this.entityPosMgr.occupyTile(t, e); + } +} diff --git a/src/main/java/de/welterde/em/data/Room.java b/src/main/java/de/welterde/em/data/Room.java new file mode 100644 index 0000000..ecc74e8 --- /dev/null +++ b/src/main/java/de/welterde/em/data/Room.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +/** + * + * @author welterde + */ +public final class Room extends LocationBase implements Location { + +} diff --git a/src/main/java/de/welterde/em/data/RoomCoord.java b/src/main/java/de/welterde/em/data/RoomCoord.java new file mode 100644 index 0000000..453f191 --- /dev/null +++ b/src/main/java/de/welterde/em/data/RoomCoord.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +/** + * + * @author welterde + */ +public record RoomCoord(short sector, short level, short corridor, short room) { + +} diff --git a/src/main/java/de/welterde/em/data/TerrainGen.java b/src/main/java/de/welterde/em/data/TerrainGen.java new file mode 100644 index 0000000..a8dbefa --- /dev/null +++ b/src/main/java/de/welterde/em/data/TerrainGen.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +/** + * + * @author welterde + */ +public interface TerrainGen { + public Tile generateTile(X ctx, MapCoord c); +} diff --git a/src/main/java/de/welterde/em/data/Tile.java b/src/main/java/de/welterde/em/data/Tile.java new file mode 100644 index 0000000..49af1eb --- /dev/null +++ b/src/main/java/de/welterde/em/data/Tile.java @@ -0,0 +1,47 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +/** + * + * @author welterde + */ +public interface Tile { + public TileType getType(); + + // get Room/Corridor/.. if there is any + public Location getLocation(); + + public Tile setLocation(Location loc); + + // get next tile in specified direction + public Tile next(Direction dir); + + public boolean isWalkable(); + + public boolean isBuildable(); + + /** + * Get entity occupying this tile if there is any + * + * @return + */ + public Entity getEntity(); + + public Tile occupy(Entity e); + +} diff --git a/src/main/java/de/welterde/em/data/TileImpl.java b/src/main/java/de/welterde/em/data/TileImpl.java new file mode 100644 index 0000000..b34291a --- /dev/null +++ b/src/main/java/de/welterde/em/data/TileImpl.java @@ -0,0 +1,83 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +import de.welterde.em.CollisionException; + +/** + * + * @author welterde + */ +public record TileImpl(OutpostMap ctx, MapCoord coord, TileType type, Location location, Entity occupator) implements Tile { + + @Override + public TileType getType() { + return type; + } + + @Override + public Location getLocation() { + return location; + } + + @Override + public Tile setLocation(Location newLocation) { + Tile upd = new TileImpl(ctx, coord, type, newLocation, occupator); + ctx.updateTile(coord, upd); + return upd; + } + + @Override + public Tile next(Direction dir) { + var nextCoord = coord.move(dir); + return this.ctx.getTile(nextCoord); + } + + @Override + public boolean isWalkable() { + // this tile needs to be empty, the tile above needs to be empty + // and tile below needs to be solid + + } + + @Override + public boolean isBuildable() { + // only check if this tile is available for building + // check if it is occupied already + } + + @Override + public Entity getEntity() { + + } + + @Override + public Tile occupy(Entity e) { + // if we are already occupied.. + if(this.getEntity() != null) + throw new CollisionException(); + + // in case object is fixed we will remember that + if(!e.isMovable()) { + Tile upd = new TileImpl(ctx, coord, type, location, e); + ctx.updateTile(coord, upd); + return upd; + } else { + ctx.occupyTile(this, e); + } + } +} diff --git a/src/main/java/de/welterde/em/data/TileType.java b/src/main/java/de/welterde/em/data/TileType.java new file mode 100644 index 0000000..778d262 --- /dev/null +++ b/src/main/java/de/welterde/em/data/TileType.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data; + +/** + * + * @author welterde + */ +public enum TileType { + // tile is fully filed with some material + FILLED, + // tile is fully unfilled/uninvolved + AIR, + CORRIDOR, + ROOM, + WALL, + DOOR, +} diff --git a/src/main/java/de/welterde/em/data/gen/BasicTerrainGen.java b/src/main/java/de/welterde/em/data/gen/BasicTerrainGen.java new file mode 100644 index 0000000..f788c9e --- /dev/null +++ b/src/main/java/de/welterde/em/data/gen/BasicTerrainGen.java @@ -0,0 +1,42 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data.gen; + +import de.welterde.em.data.MapCoord; +import de.welterde.em.data.OutpostMap; +import de.welterde.em.data.TerrainGen; +import de.welterde.em.data.Tile; +import de.welterde.em.data.TileImpl; +import de.welterde.em.data.TileType; + +/** + * + * @author welterde + */ +public class BasicTerrainGen implements TerrainGen { + + @Override + public Tile generateTile(OutpostMap ctx, MapCoord c) { + if(c.isUnderground()) { + // generate tile with filled material + return new TileImpl(ctx, c, TileType.FILLED, null, null); + } else { + return new TileImpl(ctx, c, TileType.AIR, null, null); + } + } + +} diff --git a/src/main/java/de/welterde/em/data/gen/OutpostGen.java b/src/main/java/de/welterde/em/data/gen/OutpostGen.java new file mode 100644 index 0000000..e0f22da --- /dev/null +++ b/src/main/java/de/welterde/em/data/gen/OutpostGen.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.data.gen; + +/** + * + * @author welterde + */ +public class OutpostGen { + +} diff --git a/src/main/java/de/welterde/em/e/Employee.java b/src/main/java/de/welterde/em/e/Employee.java new file mode 100644 index 0000000..26d3677 --- /dev/null +++ b/src/main/java/de/welterde/em/e/Employee.java @@ -0,0 +1,30 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.e; + +/** + * + * @author welterde + */ +public class Employee { + protected String name; + + + public Employee(String name) { + this.name = name; + } +} diff --git a/src/main/java/de/welterde/em/e/Skill.java b/src/main/java/de/welterde/em/e/Skill.java new file mode 100644 index 0000000..6ce776f --- /dev/null +++ b/src/main/java/de/welterde/em/e/Skill.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.e; + +/** + * + * @author welterde + */ +public interface Skill { + +} diff --git a/src/main/java/de/welterde/em/entity/EntityManager.java b/src/main/java/de/welterde/em/entity/EntityManager.java new file mode 100644 index 0000000..453a476 --- /dev/null +++ b/src/main/java/de/welterde/em/entity/EntityManager.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.entity; + +import de.welterde.em.data.OutpostMap; + +/** + * + * @author welterde + */ +public class EntityManager { + + protected final OutpostMap ctx; + + public EntityManager(OutpostMap ctx) { + this.ctx = ctx; + } +} diff --git a/src/main/java/de/welterde/em/entity/ItemBase.java b/src/main/java/de/welterde/em/entity/ItemBase.java new file mode 100644 index 0000000..3ab7cf8 --- /dev/null +++ b/src/main/java/de/welterde/em/entity/ItemBase.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.entity; + +import de.welterde.em.data.Entity; + +/** + * + * @author welterde + */ +public abstract class ItemBase implements Entity { + +} diff --git a/src/main/java/de/welterde/em/room/RoomType.java b/src/main/java/de/welterde/em/room/RoomType.java new file mode 100644 index 0000000..5dde24f --- /dev/null +++ b/src/main/java/de/welterde/em/room/RoomType.java @@ -0,0 +1,27 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.room; + +/** + * + * @author welterde + */ +public enum RoomType { + LAB, + OFFICE, + COMPUTER_ROOM, +} diff --git a/src/main/java/de/welterde/em/w/City.java b/src/main/java/de/welterde/em/w/City.java new file mode 100644 index 0000000..f0d075f --- /dev/null +++ b/src/main/java/de/welterde/em/w/City.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.w; + +/** + * + * @author welterde + */ +public class City { + +} diff --git a/src/main/java/de/welterde/em/w/Country.java b/src/main/java/de/welterde/em/w/Country.java new file mode 100644 index 0000000..8923416 --- /dev/null +++ b/src/main/java/de/welterde/em/w/Country.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.w; + +/** + * + * @author welterde + */ +public class Country { + +} diff --git a/src/main/java/de/welterde/em/w/Dimension.java b/src/main/java/de/welterde/em/w/Dimension.java new file mode 100644 index 0000000..32f9815 --- /dev/null +++ b/src/main/java/de/welterde/em/w/Dimension.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.w; + +/** + * + * @author welterde + */ +public class Dimension { + +} diff --git a/src/main/java/de/welterde/em/w/DimensionType.java b/src/main/java/de/welterde/em/w/DimensionType.java new file mode 100644 index 0000000..3b986d1 --- /dev/null +++ b/src/main/java/de/welterde/em/w/DimensionType.java @@ -0,0 +1,32 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.w; + +/** + * + * @author welterde + */ +public enum DimensionType { + /** + * Our dimension or other dimension with nor particular features + */ + BASE, + /** + * Endless backrooms + */ + BACKROOMS, +} diff --git a/src/main/java/de/welterde/em/w/Org.java b/src/main/java/de/welterde/em/w/Org.java new file mode 100644 index 0000000..ade2034 --- /dev/null +++ b/src/main/java/de/welterde/em/w/Org.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.w; + +/** + * Organization + * @author welterde + */ +public class Org { + +} diff --git a/src/main/java/de/welterde/em/w/Outpost.java b/src/main/java/de/welterde/em/w/Outpost.java new file mode 100644 index 0000000..5bea1fb --- /dev/null +++ b/src/main/java/de/welterde/em/w/Outpost.java @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.w; + +import java.util.EnumSet; + +/** + * + * @author welterde + */ +public class Outpost { + protected final EnumSet flags; + + public Outpost() { + this.flags = EnumSet.noneOf(OutpostFlags.class); + } +} diff --git a/src/main/java/de/welterde/em/w/OutpostFlags.java b/src/main/java/de/welterde/em/w/OutpostFlags.java new file mode 100644 index 0000000..b3bcfa5 --- /dev/null +++ b/src/main/java/de/welterde/em/w/OutpostFlags.java @@ -0,0 +1,41 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.w; + +/** + * + * @author welterde + */ +public enum OutpostFlags { + /** + * Traffic connection via rail + */ + RAIL_CONNECTION, + BOAT_CONNECTION, + ROAD_CONNECTION, + AIR_CONNECTION, + + /** + * receives mail service from government + */ + MAIL_SERVICE, + + /** + * Has outside connection for utilities like water, sewage, electricity + */ + UTILITIES_CONNECTION; +} diff --git a/src/main/java/de/welterde/em/w/OutpostLocationType.java b/src/main/java/de/welterde/em/w/OutpostLocationType.java new file mode 100644 index 0000000..e883fea --- /dev/null +++ b/src/main/java/de/welterde/em/w/OutpostLocationType.java @@ -0,0 +1,40 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.w; + +/** + * + * @author welterde + */ +public enum OutpostLocationType { + INNER_CITY, + CITY_RESEARCH_PARK, + VILLAGE, + REMOTE_DESERT, + REMOTE_WOODS, + REMOTE_MOUNTAIN, + REMOTE_UNDERSEA; + + public boolean nearPopulationCenter() { + return switch (this) { + case INNER_CITY, CITY_RESEARCH_PARK, VILLAGE -> + true; + default -> + false; + }; + } +} diff --git a/src/main/java/de/welterde/em/w/World.java b/src/main/java/de/welterde/em/w/World.java new file mode 100644 index 0000000..96bcab4 --- /dev/null +++ b/src/main/java/de/welterde/em/w/World.java @@ -0,0 +1,25 @@ +/* + * Copyright (C) 2026 welterde + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +package de.welterde.em.w; + +/** + * + * @author welterde + */ +public class World { + +}