diff --git a/core/out/production/classes/META-INF/galaxytrucker.core.main.kotlin_module b/core/out/production/classes/META-INF/galaxytrucker.core.main.kotlin_module new file mode 100644 index 0000000000000000000000000000000000000000..8fb60192d378759239a3ecbf60eac8c8de446e9c Binary files /dev/null and b/core/out/production/classes/META-INF/galaxytrucker.core.main.kotlin_module differ diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/ClientControllerCommunicator.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/ClientControllerCommunicator.java index 9952e0ba58192434496a079353fda982187cf3b3..bb0649753fef1c50d2a450448425cf3d21ba928e 100644 --- a/core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/ClientControllerCommunicator.java +++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/ClientControllerCommunicator.java @@ -1,9 +1,11 @@ package com.galaxytrucker.galaxytruckerreloaded.Controller.Actions; import com.galaxytrucker.galaxytruckerreloaded.Model.Ship; +import lombok.Getter; import lombok.Setter; @Setter +@Getter public class ClientControllerCommunicator { /** Client ship */ diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Model/ShipLayout/System.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Model/ShipLayout/System.java index 559155c7824ae382cdd7b3648ae72ffadc00701c..cb03eed2508c80bf68d99aca24491fe7ee6a98b8 100644 --- a/core/src/com/galaxytrucker/galaxytruckerreloaded/Model/ShipLayout/System.java +++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/Model/ShipLayout/System.java @@ -43,4 +43,9 @@ public abstract class System extends Room implements Serializable { @DatabaseField(foreign = true, columnName = "crew") @NonNull private List<Crew> crew; + + /** Whether or not the system is disabled */ + @DatabaseField(columnName = "disabled") + @NonNull + private boolean disabled = false; } diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Exception/SystemNotFoundException.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Exception/DuplicateRoomException.java similarity index 54% rename from core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Exception/SystemNotFoundException.java rename to core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Exception/DuplicateRoomException.java index 2691aa668a992492e81a2314a31664ec98b35e1b..38f82df41b6c823b477f86e0d25e19a367087608 100644 --- a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Exception/SystemNotFoundException.java +++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Exception/DuplicateRoomException.java @@ -1,4 +1,4 @@ package com.galaxytrucker.galaxytruckerreloaded.Server.Exception; -public class SystemNotFoundException extends Exception { +public class DuplicateRoomException extends Exception { } diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Exception/DuplicateSystemException.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Exception/DuplicateWeaponException.java similarity index 54% rename from core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Exception/DuplicateSystemException.java rename to core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Exception/DuplicateWeaponException.java index 10dc3e114eff361b9c6dd125c2c3594906d1c720..9003ffdf8870fc590b14e461427b149828fdd133 100644 --- a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Exception/DuplicateSystemException.java +++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Exception/DuplicateWeaponException.java @@ -1,4 +1,4 @@ package com.galaxytrucker.galaxytruckerreloaded.Server.Exception; -public class DuplicateSystemException extends Exception { +public class DuplicateWeaponException extends Exception { } diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Exception/RoomNotFoundException.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Exception/RoomNotFoundException.java new file mode 100644 index 0000000000000000000000000000000000000000..3ce26e3a9754090a1f735a67b2c519374c8470f8 --- /dev/null +++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Exception/RoomNotFoundException.java @@ -0,0 +1,4 @@ +package com.galaxytrucker.galaxytruckerreloaded.Server.Exception; + +public class RoomNotFoundException extends Exception { +} diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Exception/WeaponNotFoundException.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Exception/WeaponNotFoundException.java new file mode 100644 index 0000000000000000000000000000000000000000..ad5564bec06f6bffcb35193adfb83b0b4b676457 --- /dev/null +++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Exception/WeaponNotFoundException.java @@ -0,0 +1,4 @@ +package com.galaxytrucker.galaxytruckerreloaded.Server.Exception; + +public class WeaponNotFoundException extends Exception { +} diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Persistence/RoomDAO.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Persistence/RoomDAO.java new file mode 100644 index 0000000000000000000000000000000000000000..08986371083b76707cabcd815f2016b2db4b1a89 --- /dev/null +++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Persistence/RoomDAO.java @@ -0,0 +1,41 @@ +package com.galaxytrucker.galaxytruckerreloaded.Server.Persistence; + +import com.galaxytrucker.galaxytruckerreloaded.Model.ShipLayout.Room; +import com.galaxytrucker.galaxytruckerreloaded.Server.Exception.DuplicateRoomException; +import com.galaxytrucker.galaxytruckerreloaded.Server.Exception.RoomNotFoundException; + +/** This class manages room objects in the database */ +public class RoomDAO extends ObjectDAO<Room> { + + /** + * Add a new room to the database + * + * @param r - the room to add + * @throws DuplicateRoomException if the system already exists in the database + */ + @Override + public void persist(Room r) throws DuplicateRoomException { + + } + + /** + * Edit an existing room in the database + * + * @param r - the room to edit + * @throws RoomNotFoundException if the room cannot be found in the database + */ + public void edit(Room r) throws RoomNotFoundException { + + } + + /** + * Remove an existing room from the database + * + * @param r - the room to remove + * @throws RoomNotFoundException if the room cannot be found in the database + */ + @Override + public void remove(Room r) throws RoomNotFoundException { + + } +} diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Persistence/SystemDAO.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Persistence/SystemDAO.java deleted file mode 100644 index b24557c591befcffd2b1986c8601f895066c91c3..0000000000000000000000000000000000000000 --- a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Persistence/SystemDAO.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.galaxytrucker.galaxytruckerreloaded.Server.Persistence; - -import com.galaxytrucker.galaxytruckerreloaded.Model.ShipLayout.System; -import com.galaxytrucker.galaxytruckerreloaded.Server.Exception.DuplicateSystemException; -import com.galaxytrucker.galaxytruckerreloaded.Server.Exception.SystemNotFoundException; - -public class SystemDAO extends ObjectDAO<System> { - - /** - * Add a new system to the database - * - * @param s - the system to add - * @throws DuplicateSystemException if the system already exists in the database - */ - @Override - public void persist(System s) throws DuplicateSystemException { - - } - - /** - * Remove an existing system from the database - * - * @param s - the system to remove - * @throws SystemNotFoundException if the system cannot be found in the database - */ - @Override - public void remove(System s) throws SystemNotFoundException { - - } -} diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Persistence/WeaponDAO.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Persistence/WeaponDAO.java new file mode 100644 index 0000000000000000000000000000000000000000..b9081f7bd7a08cb9b338ac780033156c951c431f --- /dev/null +++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Persistence/WeaponDAO.java @@ -0,0 +1,44 @@ +package com.galaxytrucker.galaxytruckerreloaded.Server.Persistence; + +import com.galaxytrucker.galaxytruckerreloaded.Model.Weapons.Weapon; +import com.galaxytrucker.galaxytruckerreloaded.Server.Exception.DuplicateWeaponException; +import com.galaxytrucker.galaxytruckerreloaded.Server.Exception.WeaponNotFoundException; + +/** + * This class manages weapons in the database + */ +public class WeaponDAO extends ObjectDAO<Weapon> { + + /** + * Add a new weapon to the database + * + * @param w - the weapon to add + * @throws DuplicateWeaponException if the weapon already exists in the database + */ + @Override + public void persist(Weapon w) throws DuplicateWeaponException { + + } + + /** + * Edit an existing weapon in the database + * + * @param w - the weapon to edit + * @throws WeaponNotFoundException if the weapon doesn't exist in the database + */ + public void edit(Weapon w) throws WeaponNotFoundException { + + } + + /** + * Remove an existing weapon from the database + * + * @param w - the weapon to remove + * @throws WeaponNotFoundException if the weapon cannot be found in the database + */ + @Override + public void remove(Weapon w) throws WeaponNotFoundException { + + } + +} diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/BattleService.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/BattleService.java index ac8e8d8693acb533f5bdef5ba9aa3b0fbf1257ee..30d86500c2f2ea5fb472736985d055cdb9013d8e 100644 --- a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/BattleService.java +++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/BattleService.java @@ -2,14 +2,36 @@ package com.galaxytrucker.galaxytruckerreloaded.Server.Services; import com.badlogic.gdx.scenes.scene2d.ui.List; import com.galaxytrucker.galaxytruckerreloaded.Model.Ship; +import com.galaxytrucker.galaxytruckerreloaded.Model.ShipLayout.Room; import com.galaxytrucker.galaxytruckerreloaded.Model.Weapons.Weapon; +import com.galaxytrucker.galaxytruckerreloaded.Server.Persistence.CrewDAO; +import com.galaxytrucker.galaxytruckerreloaded.Server.Persistence.RoomDAO; +import com.galaxytrucker.galaxytruckerreloaded.Server.Persistence.ShipDAO; +import com.galaxytrucker.galaxytruckerreloaded.Server.Persistence.WeaponDAO; import lombok.*; +/** This class handles battle logic on the server side */ @Getter @Setter @RequiredArgsConstructor(access = AccessLevel.PUBLIC) public class BattleService { + /** ShipDAO */ + @NonNull + private ShipDAO shipDAO; + + /** WeaponDAO */ + @NonNull + private WeaponDAO weaponDAO; + + /** CrewDAO */ + @NonNull + private CrewDAO crewDAO; + + /** RoomDAO */ + @NonNull + private RoomDAO roomDAO; + /** List of ships participating in the fight */ @NonNull private List<Ship> participants; @@ -17,41 +39,45 @@ public class BattleService { /** The ship which's round it is */ private Ship currentRound; + /** Disabled system round counter */ + private int disabledSystemCounter = 3; + /** Change the ship which's round it is */ public void nextRound(){} /** Validate user input by checking if it's his round to play * @param s - the ship which wants to play * @return true if it is it's round else false */ - private boolean validMove(Ship s){ + public boolean validMove(Ship s){ return false; } /** Make one ship attack another's section * @param attacker - the attacking ship * @param opponent - the opponent's ship - * @param weapon - the weapon attacking */ - private void attack(Ship attacker, Ship opponent, Weapon weapon){} + * @param weapon - the weapon attacking + * @param room - the room being attacked */ + public void attack(Ship attacker, Ship opponent, Weapon weapon, Room room){} /** Heal a ship * @param ship - the ship to heal * @param healingWeapon - the healing weapon */ - private void heal(Ship ship,Weapon healingWeapon){} + public void heal(Ship ship,Weapon healingWeapon){} /** Flee a fight, reward the winner * @param coward - the ship that wants to flee * @param opponent - the opponent that wins the fight */ - private void fleeFight(Ship coward, Ship opponent){} + public void fleeFight(Ship coward, Ship opponent){} /** Give winner reward and end the fight (or the game) * @param loser - the ship that lost * @param victor - the ship that won */ - private void endFight(Ship loser, Ship victor){} + public void endFight(Ship loser, Ship victor){} - /** Receive data from server and turn into valid battle move - * @param s - the string to turn to battle moves - * @return the outcome of the battle moves as a string command */ - public String applyBattleMoves(String s){ - return null; + /** Check if a ship is dead + * @param s - the ship + * @return true if the ship is dead else false */ + public boolean isDead(Ship s){ + return false; } } diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/CrewService.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/CrewService.java index ed275923f4e6fe31cccdfe883fb13d02b92859b8..51a231fd8fbaf3ffe7e09bfa194a1be507eb8b18 100644 --- a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/CrewService.java +++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/CrewService.java @@ -1,41 +1,82 @@ package com.galaxytrucker.galaxytruckerreloaded.Server.Services; import com.galaxytrucker.galaxytruckerreloaded.Model.Crew.Crew; -import com.galaxytrucker.galaxytruckerreloaded.Server.Exception.CrewNotFoundException; -import com.galaxytrucker.galaxytruckerreloaded.Server.Exception.DuplicateCrewException; +import com.galaxytrucker.galaxytruckerreloaded.Model.Ship; +import com.galaxytrucker.galaxytruckerreloaded.Model.ShipLayout.Room; +import com.galaxytrucker.galaxytruckerreloaded.Model.ShipLayout.System; import com.galaxytrucker.galaxytruckerreloaded.Server.Persistence.CrewDAO; +import com.galaxytrucker.galaxytruckerreloaded.Server.Persistence.RoomDAO; +import com.galaxytrucker.galaxytruckerreloaded.Server.Persistence.ShipDAO; +import lombok.*; +/** This class handles the logic for crew aboard the ship, server side */ +@Getter +@Setter +@RequiredArgsConstructor(access = AccessLevel.PUBLIC) public class CrewService { - /** - * DAO - */ + /** ShipDAO */ + @NonNull + private ShipDAO shipDAO; + + /** CrewDAO */ + @NonNull private CrewDAO crewDAO; - /** - * Add a new crew member - * - * @param c - the crew member to add - * @throws DuplicateCrewException if the crew already exists - */ - public void addCrew(Crew c) throws DuplicateCrewException { + /** RoomDAO */ + @NonNull + private RoomDAO roomDAO; + + /** Validate the command given + * @param s - the given command + * @return true if it is valid, else false */ + public boolean validateCrewMove(String s){ + return false; + } + + /** Move a crew member to a different section + * @param ship - the ship the crew is on + * @param crew - the crew member + * @param room - the room to move him to */ + public void moveCrewToRoom(Ship ship, Crew crew, Room room){ + + } + + /** Heal crew + * @param ship - the ship the crew is on + * @param crew - the crew member to heal + * @param healAmount - amount to heal */ + public void healCrewMember(Ship ship,Crew crew,int healAmount){ + } - /** - * Edit an existing crew member - * - * @param c - the crew member to edit - * @throws CrewNotFoundException if the crew cannot be found - */ - public void editCrew(Crew c) throws CrewNotFoundException { + /** Heal crew in a room + * @param ship - the ship the crew are on + * @param room - the room which's crew members to heal + * @param amount - amount to heal */ + public void healCrewInRoom(Ship ship,Room room,int amount){ + + } + + /** Damage crew + * @param ship - the ship the crew is on + * @param room - the room in which to damage the crew + * @param amount - the amount of damage to take */ + public void damageCrew(Ship ship,Room room,int amount){ + } - /** - * Remove an existing crew member - * - * @param c - the crew to remove - * @throws CrewNotFoundException if the crew cannot be found - */ - public void removeCrew(Crew c) throws CrewNotFoundException { + /** Fix a system + * @param ship - the ship to fix a system on + * @param system - the system to fix */ + public void fixSystem(Ship ship, System system){ + + } + + /** Repair a breach in a room + * @param ship - the ship to fix the rbeach on + * @param room - the room to fix the breach in */ + public void repairBreach(Ship ship,Room room){ + } } diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/OverworldService.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/OverworldService.java deleted file mode 100644 index 9145fba7609ea2607deb2fd76634d3ac8d9b4e38..0000000000000000000000000000000000000000 --- a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/OverworldService.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.galaxytrucker.galaxytruckerreloaded.Server.Services; - -import com.galaxytrucker.galaxytruckerreloaded.Model.Map.Overworld; -import com.galaxytrucker.galaxytruckerreloaded.Server.Exception.DuplicateOverworldException; -import com.galaxytrucker.galaxytruckerreloaded.Server.Exception.OverworldNotFoundException; -import com.galaxytrucker.galaxytruckerreloaded.Server.Persistence.OverworldDAO; - -public class OverworldService { - - /** - * DAO - */ - private OverworldDAO overworldDAO; - - /** - * Add a new OverWorld - * - * @param o - the OverWorld to add - * @throws DuplicateOverworldException if the OverWorld already exists - */ - public void addOverworld(Overworld o) throws DuplicateOverworldException { - } - - /** - * Remove an existing OverWorld - * - * @param o - the OverWorld to remove - * @throws OverworldNotFoundException if the OverWorld cannot be found - */ - public void removeOverworld(Overworld o) throws OverworldNotFoundException { - } -} diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/RewardService.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/RewardService.java index f0c148ed21e388ce71ed3b60f0b3bca4ee2915bd..d17afc872859e980081592c402b3b7dab2955c6f 100644 --- a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/RewardService.java +++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/RewardService.java @@ -1,4 +1,52 @@ package com.galaxytrucker.galaxytruckerreloaded.Server.Services; +import com.badlogic.gdx.scenes.scene2d.ui.List; +import com.galaxytrucker.galaxytruckerreloaded.Model.Ship; +import com.galaxytrucker.galaxytruckerreloaded.Model.Weapons.Weapon; +import com.galaxytrucker.galaxytruckerreloaded.Server.Persistence.ShipDAO; +import com.galaxytrucker.galaxytruckerreloaded.Server.Persistence.WeaponDAO; +import lombok.*; + +/** This class handles reward handing to players */ +@RequiredArgsConstructor(access = AccessLevel.PUBLIC) +@Getter +@Setter public class RewardService { + + /** ShipDAO */ + @NonNull + private ShipDAO shipDAO; + + /** WeaponDAO */ + @NonNull + private WeaponDAO weaponDAO; + + /** Weapon reward + * @param s - the ship to give reward to + * @param dropTable - possible weapon drops + * @return the weapon given */ + public Weapon weaponReward(Ship s, List<Weapon> dropTable){ + return null; + } + + /** Coin reward + * @param s - the ship to give reward to + * @param c - the coins to give it */ + public void coinsReward(Ship s, int c){ + + } + + /** Fuel reward + * @param s - the ship to give reward to + * @param f - the fuel to give it*/ + public void fuelReward(Ship s,int f){ + + } + + /** Rocket reward + * @param s - the ship to give reward to + * @param r - the rockets to give it */ + public void rocketReward(Ship s,int r){ + + } } diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/RoomService.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/RoomService.java new file mode 100644 index 0000000000000000000000000000000000000000..e59d0d8d223cc53a410a6281621ef79d070687ac --- /dev/null +++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/RoomService.java @@ -0,0 +1,41 @@ +package com.galaxytrucker.galaxytruckerreloaded.Server.Services; + +import com.galaxytrucker.galaxytruckerreloaded.Model.Ship; +import com.galaxytrucker.galaxytruckerreloaded.Model.ShipLayout.Room; +import com.galaxytrucker.galaxytruckerreloaded.Model.ShipLayout.System; +import com.galaxytrucker.galaxytruckerreloaded.Server.Persistence.RoomDAO; +import com.galaxytrucker.galaxytruckerreloaded.Server.Persistence.ShipDAO; +import lombok.*; + +/** Handles the logic associated with a ships internal rooms and systems */ +@Getter +@Setter +@RequiredArgsConstructor(access = AccessLevel.PUBLIC) +public class RoomService { + + /** ShipDAO */ + private ShipDAO shipDAO; + + /** RoomDAO */ + @NonNull + private RoomDAO roomDAO; + + /** Cause a breach in a room + * @param ship - the ship the breach is happening on + * @param room - the room the breach is happening in */ + public void causeBreach(Ship ship,Room room){} + + /** Disable a system + * @param ship - the ship to disable a system on + * @param system - the system to disable */ + public void disableSystem(Ship ship, System system){ + + } + + /** Re-enable a system + * @param ship - the ship to re-enable a system on + * @param system - the system to re-enable */ + public void reEnableSystem(Ship ship,System system){ + + } +} diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/SystemService.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/SystemService.java index b5784d98011032ccf46cc8dd80e66f5a688e6bd9..6b40789653143f44722ff12178b9df23cf3c000b 100644 --- a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/SystemService.java +++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/SystemService.java @@ -1,32 +1,32 @@ package com.galaxytrucker.galaxytruckerreloaded.Server.Services; import com.galaxytrucker.galaxytruckerreloaded.Model.ShipLayout.System; -import com.galaxytrucker.galaxytruckerreloaded.Server.Exception.DuplicateSystemException; -import com.galaxytrucker.galaxytruckerreloaded.Server.Exception.SystemNotFoundException; -import com.galaxytrucker.galaxytruckerreloaded.Server.Persistence.SystemDAO; +import com.galaxytrucker.galaxytruckerreloaded.Server.Exception.DuplicateRoomException; +import com.galaxytrucker.galaxytruckerreloaded.Server.Exception.RoomNotFoundException; +import com.galaxytrucker.galaxytruckerreloaded.Server.Persistence.RoomDAO; public class SystemService { /** * System dao */ - private SystemDAO systemDAO; + private RoomDAO roomDAO; /** * Add a new system * * @param s - the system to add - * @throws DuplicateSystemException if the system already exists + * @throws DuplicateRoomException if the system already exists */ - public void addSystem(System s) throws DuplicateSystemException { + public void addSystem(System s) throws DuplicateRoomException { } /** * Remove a system * * @param s - the system to remove - * @throws SystemNotFoundException if the system cannot be found + * @throws RoomNotFoundException if the system cannot be found */ - public void removeSystem(System s) throws SystemNotFoundException { + public void removeSystem(System s) throws RoomNotFoundException { } } diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/TravelService.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/TravelService.java index e53283963561bbb5011888086ef32cbecfb178e1..a6ee545a97007700e3e686b52f99be1a6960392a 100644 --- a/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/TravelService.java +++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/Server/Services/TravelService.java @@ -2,19 +2,24 @@ package com.galaxytrucker.galaxytruckerreloaded.Server.Services; import com.galaxytrucker.galaxytruckerreloaded.Model.Map.Planet; import com.galaxytrucker.galaxytruckerreloaded.Model.Ship; +import com.galaxytrucker.galaxytruckerreloaded.Server.Persistence.PlanetDAO; import com.galaxytrucker.galaxytruckerreloaded.Server.Persistence.ShipDAO; import lombok.*; /** Used to move user from one star to another */ +@RequiredArgsConstructor(access = AccessLevel.PUBLIC) @Getter @Setter -@RequiredArgsConstructor(access = AccessLevel.PUBLIC) public class TravelService { - /** ShipDAO for database access */ + /** ShipDAO */ @NonNull private ShipDAO shipDAO; + /** PlanetDAO */ + @NonNull + private PlanetDAO planetDAO; + /** Validate the travel request * @param s - the ship that wisches to travel * @return true if the travel request is valid */ diff --git a/desktop/out/production/resources/badlogic.jpg b/desktop/out/production/resources/badlogic.jpg new file mode 100644 index 0000000000000000000000000000000000000000..4390da6e0f6d041590c6313d2b4c978abc00a342 Binary files /dev/null and b/desktop/out/production/resources/badlogic.jpg differ