From af3bde9419c738dfbf6702b37c030908221d3e02 Mon Sep 17 00:00:00 2001 From: Fabian <fakehlenbeck@googlemail.com> Date: Fri, 29 May 2020 17:43:45 +0200 Subject: [PATCH] Controller update, Trader, Crew, Travel --- .../Controller/Actions/CrewController.java | 55 ++++++++++++++++++ .../Controller/Actions/Move.java | 5 -- .../Controller/Actions/TraderController.java | 57 +++++++++++++++++++ .../Controller/Actions/TravelController.java | 23 ++++++++ 4 files changed, 135 insertions(+), 5 deletions(-) create mode 100644 core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/CrewController.java delete mode 100644 core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/Move.java create mode 100644 core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/TraderController.java create mode 100644 core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/TravelController.java diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/CrewController.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/CrewController.java new file mode 100644 index 00000000..38dd3bb7 --- /dev/null +++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/CrewController.java @@ -0,0 +1,55 @@ +package com.galaxytrucker.galaxytruckerreloaded.Controller.Actions; + +import com.galaxytrucker.galaxytruckerreloaded.Model.Crew.Crew; +import com.galaxytrucker.galaxytruckerreloaded.Model.Ship; +import com.galaxytrucker.galaxytruckerreloaded.Model.ShipLayout.Room; +import com.galaxytrucker.galaxytruckerreloaded.Model.ShipLayout.System; +import lombok.*; + +@Getter +@Setter +@RequiredArgsConstructor(access = AccessLevel.PUBLIC) +public class CrewController extends Controller{ + @NonNull + private Ship myself; + + /** Move a crew member to a different section + * @param crew - the crew member + * @param room - the room to move him to */ + public void moveCrewToRoom(Crew crew, Room room){ + + } + + /** Heal crew + * @param crew - the crew member to heal + * @param healAmount - amount to heal */ + public void healCrewMember(Crew crew,int healAmount){ + + } + + /** Heal crew in a room + * @param room - the room which's crew members to heal + * @param amount - amount to heal */ + public void healCrewInRoom(Room room,int amount){ + + } + + /** Damage crew + * @param room - the room in which to damage the crew + * @param amount - the amount of damage to take */ + public void damageCrew(Room room,int amount){ + + } + + /** Fix a system + * @param system - the system to fix */ + public void fixSystem(System system){ + + } + + /** Repair a breach in a room + * @param room - the room to fix the breach in */ + public void repairBreach(Room room){ + + } +} diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/Move.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/Move.java deleted file mode 100644 index 90c2a678..00000000 --- a/core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/Move.java +++ /dev/null @@ -1,5 +0,0 @@ -package com.galaxytrucker.galaxytruckerreloaded.Controller.Actions; - -public class Move { - -} diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/TraderController.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/TraderController.java new file mode 100644 index 00000000..0114883f --- /dev/null +++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/TraderController.java @@ -0,0 +1,57 @@ +package com.galaxytrucker.galaxytruckerreloaded.Controller.Actions; + + +import com.galaxytrucker.galaxytruckerreloaded.Model.Crew.Crew; +import com.galaxytrucker.galaxytruckerreloaded.Model.Map.Trader; +import com.galaxytrucker.galaxytruckerreloaded.Model.Ship; +import com.galaxytrucker.galaxytruckerreloaded.Model.Weapons.Weapon; +import lombok.*; + +@Getter +@Setter +@RequiredArgsConstructor(access = AccessLevel.PUBLIC) +public class TraderController extends Controller{ + /** My own ship */ + @NonNull + private Ship myself; + /** the trader */ + @NonNull + private Trader trader; + + /** + * Buy a weapon from the trader + * @param weapon - the weapon to buy + */ + private void purchaseWeapon(Weapon weapon) { + } + + /** + * Buy crew from a trader + * @param crew - the crew to buy + */ + public void purchaseCrew(Crew crew) { + } + + /** + * Buy rockets from the trader + * @param amount - the amount of rockets to buy + */ + public void purchaseRockets(int amount) { + } + + /** + * Buy fuel from the trader + * @param amount - the amount of fuel to buy + */ + public void purchaseFuel( int amount) { + } + + /** + * Buy health from the trader + * @param amount - the amount to buy + */ + public void purchaseHP(int amount) { + } + + +} diff --git a/core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/TravelController.java b/core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/TravelController.java new file mode 100644 index 00000000..2577d9a9 --- /dev/null +++ b/core/src/com/galaxytrucker/galaxytruckerreloaded/Controller/Actions/TravelController.java @@ -0,0 +1,23 @@ +package com.galaxytrucker.galaxytruckerreloaded.Controller.Actions; + +import com.galaxytrucker.galaxytruckerreloaded.Model.Map.Planet; +import com.galaxytrucker.galaxytruckerreloaded.Model.Ship; +import lombok.*; + +@Getter +@Setter +@RequiredArgsConstructor(access = AccessLevel.PUBLIC) +public class TravelController extends Controller{ + /** + * My own ship + */ + @NonNull + private Ship myself; + + /** + * travels from one location to another + * @param destination - the destination + */ + public void travel(Planet destination){ + } +} -- GitLab