Advertisement
DearOohDeer

Untitled

Apr 25th, 2022
1,227
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 17.59 KB | None | 0 0
  1. //Factory
  2. package Base_Package;
  3.  
  4. import Buildings.Hatchery;
  5. import Buildings.HydraliskDen;
  6. import Buildings.SpawningPool;
  7. import Buildings.Spire;
  8.  
  9. import java.util.Scanner;
  10.  
  11. public class Factory
  12. {
  13.     static Hatchery ObHatchery = null;
  14.     static SpawningPool ObSpawningPool = null;
  15.     static HydraliskDen ObHydraliskDen = null;
  16.     static Spire ObSpire = null;
  17.  
  18.     public static void main(String[] args)
  19.     {
  20.         if(ObHatchery == null)
  21.         {
  22.             ObHatchery = new Hatchery();
  23.         }
  24.         boolean EndProg = false;
  25.         Scanner Input = new Scanner(System.in);
  26.  
  27.  
  28.         System.out.println("StarCraft 2 Zergs");
  29.         do {
  30.             menu();
  31.             int BuildingOption = Input.nextInt();
  32.  
  33.             switch (BuildingOption) {
  34.                 case 1:
  35.                     ObHatchery.Build();
  36.                     break;
  37.                 case 2:
  38.                     if(ObSpawningPool == null)
  39.                     {
  40.                         System.out.println("Utworzono Niecke Rozrodcza.Mozesz teraz powijac Zerglingi!");
  41.                         ObSpawningPool = new SpawningPool();
  42.                         ObHatchery.IsAlreadyBuild(1);
  43.                     }
  44.                     else
  45.                     {
  46.                         ObSpawningPool.Build();
  47.                     }
  48.                     break;
  49.                 case 3:
  50.  
  51.                     if(ObHydraliskDen == null)
  52.                     {
  53.                         System.out.println("Utworzono Nore Hydraliskow.Mozesz teraz powijac Hydraliski!");
  54.                         ObHydraliskDen = new HydraliskDen();
  55.                         ObHatchery.IsAlreadyBuild(2);
  56.                     }
  57.                     else
  58.                     {
  59.                         ObHydraliskDen.Build();
  60.                     }
  61.                     break;
  62.                 case 4:
  63.  
  64.                     if(ObSpire == null)
  65.                     {
  66.                         System.out.println("Utworzono Iglice!");
  67.                         ObSpire = new Spire();
  68.                     }
  69.                     else
  70.                     {
  71.                         ObSpire.Build();
  72.                     }
  73.                     break;
  74.                 case 5:
  75.                     EndProg = true;
  76.                     break;
  77.                 default:
  78.                     break;
  79.             }
  80.  
  81.         } while (!EndProg);
  82.         Input.close();
  83.     }
  84.  
  85.     static void menu()
  86.     {
  87.         System.out.println("1.Aby przejsc do mozliwosci " + ObHatchery.getName() + " - Jednostki Naziemne");
  88.  
  89.         if(ObSpawningPool == null)
  90.         {
  91.             System.out.println("2.Aby utworzyc Niecke Rozrodcza");
  92.         }
  93.         else
  94.         {
  95.             System.out.println("2.Aby przejsc do Niecki Rozrodczej - ulepszen Zerglingow");
  96.         }
  97.         if(ObHydraliskDen == null)
  98.         {
  99.             System.out.println("3.Aby utworzyc Nore Hydraliskow");
  100.         }
  101.         else
  102.         {
  103.             System.out.println("3.Aby przejsc do Nory Hydraliskow - ulepszen Hydraliskow");
  104.         }
  105.         if(ObSpire == null)
  106.         {
  107.             System.out.println("4.Aby utworzyc Iglice");
  108.         }
  109.         else
  110.         {
  111.             System.out.println("4.Aby przejsc do Iglicy - Jednostki Latajace");
  112.         }
  113.  
  114.  
  115.         System.out.println("5.Aby wyjsc");
  116.     }
  117. }
  118.  
  119. //IFactory
  120. package Base_Package;
  121.  
  122. public interface IFactory
  123. {
  124.     int getCost();
  125.     String getName();
  126. }
  127.  
  128. //IFlyingUnit
  129. package Base_Package;
  130.  
  131. public interface IFlyingUnit
  132. {
  133.     String getName();
  134.     String getUnitType();
  135.     String getArmorType();
  136.     void SetDMGUpgrade(int NewDMGBonus);
  137.     int GetDMGBonus();
  138.     int GetDMG();
  139. }
  140.  
  141. //IGroundUnit
  142. package Base_Package;
  143.  
  144. public interface IGroundUnit
  145. {
  146.     String getName();
  147.     String getUnitType();
  148.     String getArmorType();
  149. }
  150.  
  151. //ITechnology
  152. package Base_Package;
  153.  
  154. public interface ITechnology
  155. {
  156.     String GetName();
  157.     String GetCost();
  158.     boolean GetIsReady();
  159.     void SetIsReady(boolean Ready);
  160. }
  161.  
  162.  
  163. //Hatchery
  164. package Buildings;
  165.  
  166. import Base_Package.IFactory;
  167. import Base_Package.IGroundUnit;
  168. import Units.Larva;
  169. import Units.Zergling;
  170. import Units.Hydralisk;
  171.  
  172. import java.util.Scanner;
  173.  
  174. public class Hatchery implements IFactory
  175.     {
  176.         String Name = "Wylegarnia";
  177.         int Cost = 400;
  178.         Scanner UserInput = new Scanner(System.in);
  179.         boolean SpawningPoolBuilt = false;
  180.         boolean HydraliskDenBuilt = false;
  181.         boolean SpireBuilt = false;
  182.         boolean LarvaCreated = false;
  183.  
  184.  
  185.         public IGroundUnit Build()
  186.         {
  187.             int BuildingOption;
  188.             int LarvaOption;
  189.             do {
  190.                 MenuOptions();
  191.                 BuildingOption = UserInput.nextInt();
  192.                 switch(BuildingOption)
  193.                 {
  194.                     case 1:
  195.                         LarvaCreated = true;
  196.                         System.out.println("Utworzono nowego Larwy! Mozesz teraz powijac Zergi");
  197.                         return new Larva();
  198.                     case 2:
  199.                         if (LarvaCreated)
  200.                             {
  201.                                     LarvaOptions();
  202.                                     LarvaOption = UserInput.nextInt();
  203.                                     switch(LarvaOption)
  204.                                     {
  205.                                         case 1:
  206.                                             if(SpawningPoolBuilt)
  207.                                             {
  208.                                                 System.out.println("Utworzono nowego Zerglinga!");
  209.                                                 return new Zergling();
  210.                                             } else
  211.                                             {
  212.                                                 System.out.println("Potrzebujemy zbudowac Niecke Rozrodcza.");
  213.                                             }
  214.                                             break;
  215.                                         case 2:
  216.                                             if(HydraliskDenBuilt)
  217.                                             {
  218.                                                 System.out.println("Utworzono nowego Hydraliska!");
  219.                                                 return new Hydralisk();
  220.                                             }
  221.                                             else
  222.                                             {
  223.                                                 System.out.println("Potrzebujemy postawic Nore Hydraliskow." );
  224.                                             }
  225.                                             break;
  226.                                         case 3:
  227.                                             {
  228.                                                 System.out.println("Anulowano." );
  229.                                             }
  230.                                             break;
  231.                                         default:
  232.                                             System.out.println("Podano niewlasciwy wybor." );
  233.                                             throw new IllegalArgumentException();
  234.                                     }
  235.  
  236.                             }
  237.                             else
  238.                             {
  239.                                 System.out.println("Musisz powic Larwy.");
  240.                             }
  241.                         break;
  242.                     case 3:
  243.                         if (Name.equals("Wylegarnia"))
  244.                         {
  245.                             Name = "Leze";
  246.                         }
  247.                         if (Name.equals("Leze"))
  248.                         {
  249.                             Name = "Ul";
  250.                         }
  251.                         if(Name.equals("Ul"))
  252.                         {
  253.                             System.out.println("Nie mozna ulepszyc bardziej.");
  254.                         }
  255.                         break;
  256.                     case 4:
  257.                         return null;
  258.                     default:
  259.                         System.out.println("Podano niewlasciwy wybor." );
  260.                         throw new IllegalArgumentException();
  261.                 }
  262.             } while (BuildingOption != 4);
  263.             return null;
  264.         }
  265.  
  266.         private void LarvaOptions()
  267.         {
  268.             System.out.println("1.Aby powic Zerglinga");
  269.             System.out.println("2.Aby powic Hydraliska");
  270.             System.out.println("3.Aby anulowac");
  271.         }
  272.  
  273.         private void MenuOptions()
  274.         {
  275.             System.out.println("1.Aby powic Larwy.");
  276.             System.out.println("2.Aby przejsc do menu Larwy.");
  277.             System.out.println("3.Aby ulepszyc " + Name+".");
  278.             System.out.println("4.Aby wyjsc.");
  279.         }
  280.  
  281.         public void IsAlreadyBuild(int WhichOne)
  282.         {
  283.             switch (WhichOne)
  284.             {
  285.                 case 1:
  286.                     SpawningPoolBuilt = true;
  287.                     break;
  288.                 case 2:
  289.                     HydraliskDenBuilt = true;
  290.                     break;
  291.                 default:
  292.                     System.out.println("Cos poszlo nie tak w Hatchery Class");
  293.             }
  294.         }
  295.  
  296.         @Override
  297.         public int getCost()
  298.         {
  299.             return Cost;
  300.         }
  301.  
  302.         @Override
  303.         public String getName()
  304.         {
  305.             return Name;
  306.         }
  307.     }
  308.  
  309. //HydraliskDen
  310. package Buildings;
  311.  
  312. import Base_Package.IFactory;
  313. import Base_Package.ITechnology;
  314. import Technology.GroovedSpines;
  315. import Technology.MuscularAugments;
  316.  
  317.  
  318. import java.util.Scanner;
  319.  
  320. public class HydraliskDen implements IFactory
  321.     {
  322.         static MuscularAugments ObMuscularAugments = null;
  323.         static GroovedSpines ObGroovedSpines = null;
  324.  
  325.         String Name = "Nora Hydraliskow";
  326.         int Cost = 100;
  327.         Scanner UserInput = new Scanner(System.in);
  328.  
  329.         public ITechnology Build()
  330.         {
  331.             int BuildingOption;
  332.             do {
  333.                 MenuOptions();
  334.                 BuildingOption = UserInput.nextInt();
  335.                 switch(BuildingOption)
  336.                 {
  337.                     case 1:
  338.                         if(ObMuscularAugments == null)
  339.                         {
  340.                             System.out.println("Od teraz Hyraliski będą pędzić za wrogami.");
  341.                             ObMuscularAugments = new MuscularAugments();
  342.                             ObMuscularAugments.SetIsReady(true);
  343.                         }
  344.                         else
  345.                         {
  346.                             System.out.println(ObMuscularAugments.GetName() +" zostalo juz zbadany.");
  347.                         }
  348.                         break;
  349.                     case 2:
  350.                         if(ObGroovedSpines == null)
  351.                         {
  352.                             System.out.println("Od teraz Hyraliski będą szerzyć pogrom z dalszej odleglosci.");
  353.                             ObGroovedSpines = new GroovedSpines();
  354.                             ObGroovedSpines.SetIsReady(true);
  355.                         }
  356.                         else
  357.                         {
  358.                             System.out.println(ObGroovedSpines.GetName() +" zostalo juz zbadany.");
  359.                         }
  360.                         break;
  361.                     case 3:
  362.                         return null;
  363.                     default:
  364.                         System.out.println("Podano niewlasciwy wybor." );
  365.                         throw new IllegalArgumentException();
  366.                 }
  367.             } while (BuildingOption != 3);
  368.             return null;
  369.         }
  370.  
  371.         private void MenuOptions()
  372.         {
  373.             System.out.println("1.Aby zbadac  Wzmocnienie Miesni. - Zwiekszy predkosc poruszania.");
  374.             System.out.println("2.Aby zbadac Rowkowane Kolce. - Zwiekszy zasieg ataku jednostki.");
  375.             System.out.println("3.Aby wyjsc z Nory Hydraliskow");
  376.         }
  377.  
  378.         @Override
  379.         public int getCost()
  380.         {
  381.             return Cost;
  382.         }
  383.  
  384.         @Override
  385.         public String getName()
  386.         {
  387.             return Name;
  388.         }
  389.     }
  390.  
  391. //SpawningPool
  392. package Buildings;
  393.  
  394. import Base_Package.IFactory;
  395. import Base_Package.ITechnology;
  396. import Technology.AdrenalGlands;
  397. import Technology.MetabolicBoost;
  398.  
  399. import java.util.Scanner;
  400.  
  401. public class SpawningPool implements IFactory
  402. {
  403.     static MetabolicBoost ObMetabolicBoost = null;
  404.     static AdrenalGlands ObAdernalGlands = null;
  405.     String Name = "Niecka Rozdrodcza";
  406.     int Cost = 150;
  407.     Scanner UserInput = new Scanner(System.in);
  408.  
  409.     public ITechnology Build()
  410.     {
  411.         int BuildingOption;
  412.         do {
  413.             MenuOptions();
  414.             BuildingOption = UserInput.nextInt();
  415.             switch(BuildingOption)
  416.             {
  417.                 case 1:
  418.                     if(ObMetabolicBoost == null)
  419.                     {
  420.                         System.out.println("Od teraz Zerglingi będą pędzić za wrogami.");
  421.                         ObMetabolicBoost = new MetabolicBoost();
  422.                         ObMetabolicBoost.SetIsReady(true);
  423.                     }
  424.                     else
  425.                     {
  426.                         System.out.println("Przyspieszony metabolizm zostal juz zbadany.");
  427.                     }
  428.                     break;
  429.                 case 2:
  430.                     if(ObAdernalGlands == null)
  431.                     {
  432.                         System.out.println("Od teraz Zerglingi będą szerzyć pogrom jeszcze szybciej.");
  433.                         ObAdernalGlands = new AdrenalGlands();
  434.                         ObAdernalGlands.SetIsReady(true);
  435.                     }
  436.                     else
  437.                     {
  438.                         System.out.println("Nadrecza zostaly juz zbadane.");
  439.                     }
  440.                     break;
  441.                 case 3:
  442.                     return null;
  443.                 default:
  444.                     System.out.println("Podano niewlasciwy wybor." );
  445.                     throw new IllegalArgumentException();
  446.             }
  447.         } while (BuildingOption != 3);
  448.         return null;
  449.     }
  450.  
  451.     private void MenuOptions()
  452.     {
  453.         System.out.println("1.Aby zbadac przyspieszony metabolizm. - Zwiekszy predkosc poruszania");
  454.         System.out.println("2.Aby zbadac nadrecza. - Zwiekszy predkosc zadawanych obrazen");
  455.         System.out.println("3.Aby wyjsc z Niecki Rozrodczej");
  456.     }
  457.  
  458.     @Override
  459.     public int getCost()
  460.     {
  461.         return Cost;
  462.     }
  463.  
  464.     @Override
  465.     public String getName()
  466.     {
  467.         return Name;
  468.     }
  469. }
  470.  
  471. //Spire
  472. package Buildings;
  473.  
  474. import Base_Package.IFactory;
  475. import Base_Package.IFlyingUnit;
  476. import Units.Corruptor;
  477. import Units.Mutalisk;
  478.  
  479. import java.util.Scanner;
  480.  
  481. public class Spire implements IFactory
  482.     {
  483.         static Mutalisk ObMutalisk = new Mutalisk();
  484.         static Corruptor ObCorruptor = new Corruptor();
  485.         String Name = "Iglica";
  486.         int Cost = 200;
  487.         Scanner UserInput = new Scanner(System.in);
  488.  
  489.         public IFlyingUnit Build()
  490.         {
  491.             int BuildingOption;
  492.             do {
  493.                 MenuOptions();
  494.                 BuildingOption = UserInput.nextInt();
  495.                 switch(BuildingOption)
  496.                 {
  497.                     case 1:
  498.                            System.out.println("Utworzono nowego Mutaliska!");
  499.                             return new Mutalisk();
  500.                     case 2:
  501.                         System.out.println("Utworzono nowego Skaziciela!");
  502.                         return new Corruptor();
  503.                     case 3:
  504.                         switch(ObMutalisk.GetDMGBonus())
  505.                         {
  506.                             case 0:
  507.                                 ObMutalisk.SetDMGUpgrade(1);
  508.                                 ObCorruptor.SetDMGUpgrade(1);
  509.                                 System.out.println("Obrazenia zostaly zwiekszone. Bonus DMG wynosi: " + ObMutalisk.GetDMGBonus());
  510.                                 break;
  511.                             case 1:
  512.                                 ObMutalisk.SetDMGUpgrade(2);
  513.                                 ObCorruptor.SetDMGUpgrade(2);
  514.                                 System.out.println("Obrazenia zostaly zwiekszone. Bonus DMG wynosi: " + ObMutalisk.GetDMGBonus());
  515.                                 break;
  516.                             case 2:
  517.                                 System.out.println("Ulepszenie do obrazen zostalo rozwiniete maksymalnie.");
  518.                                 break;
  519.                         }
  520.                         break;
  521.                     case 4:
  522.                         return null;
  523.                     default:
  524.                         System.out.println("Podano niewlasciwy wybor." );
  525.                         throw new IllegalArgumentException();
  526.                 }
  527.             } while (BuildingOption != 4);
  528.             return null;
  529.         }
  530.  
  531.         private void MenuOptions()
  532.         {
  533.             System.out.println("1.Aby powic Mutaliska");
  534.             System.out.println("2.Aby powic Koruptora");
  535.             System.out.println("3.Aby ulepszyc obrazenia jednostek latajacych");
  536.             System.out.println("4.Aby wyjsc z Iglicy");
  537.         }
  538.  
  539.         @Override
  540.         public int getCost()
  541.         {
  542.             return Cost;
  543.         }
  544.  
  545.         @Override
  546.         public String getName()
  547.         {
  548.             return Name;
  549.         }
  550.     }
  551.  
  552. //AdrenalGlands
  553. package Technology;
  554.  
  555. import Base_Package.ITechnology;
  556.  
  557. public class AdrenalGlands implements ITechnology
  558. {
  559.     String Name = "Nadnercza";
  560.     int Cost = 100;
  561.     boolean IsReady = false;
  562.  
  563.     @Override
  564.     public String GetName()
  565.     {
  566.         return Name;
  567.     }
  568.  
  569.     @Override
  570.     public String GetCost()
  571.     {
  572.         return null;
  573.     }
  574.  
  575.     @Override
  576.     public boolean GetIsReady()
  577.     {
  578.         return IsReady;
  579.     }
  580.     @Override
  581.     public void SetIsReady(boolean Ready)
  582.     {
  583.         IsReady = Ready;
  584.     }
  585.  
  586. }
  587.  
  588. //GroovedSpines
  589. package Technology;
  590.  
  591. import Base_Package.ITechnology;
  592.  
  593. public class GroovedSpines implements ITechnology
  594. {
  595.     String Name = "Rowkowane Kolce";
  596.     int Cost = 100;
  597.     boolean IsReady = false;
  598.  
  599.     @Override
  600.     public String GetName()
  601.     {
  602.         return Name;
  603.     }
  604.  
  605.     @Override
  606.     public String GetCost()
  607.     {
  608.         return null;
  609.     }
  610.  
  611.     @Override
  612.     public boolean GetIsReady()
  613.     {
  614.         return IsReady;
  615.     }
  616.     @Override
  617.     public void SetIsReady(boolean Ready)
  618.     {
  619.         IsReady = Ready;
  620.     }
  621.  
  622. }
  623.  
  624. //MetabolicBoost
  625. package Technology;
  626.  
  627. import Base_Package.ITechnology;
  628.  
  629. public class MetabolicBoost implements ITechnology
  630. {
  631.     String Name = "Przyspieszony Metabolizm";
  632.     int Cost = 100;
  633.     boolean IsReady = false;
  634.  
  635.     @Override
  636.     public String GetName()
  637.     {
  638.         return Name;
  639.     }
  640.  
  641.     @Override
  642.     public String GetCost()
  643.     {
  644.         return null;
  645.     }
  646.  
  647.     @Override
  648.     public boolean GetIsReady()
  649.     {
  650.         return IsReady;
  651.     }
  652.     @Override
  653.     public void SetIsReady(boolean Ready)
  654.     {
  655.         IsReady = Ready;
  656.     }
  657.  
  658. }
  659.  
  660. //MuscularAugments
  661. package Technology;
  662.  
  663. import Base_Package.ITechnology;
  664.  
  665. public class MuscularAugments implements ITechnology
  666. {
  667.     String Name = "Wzmocnienie Miesni";
  668.     int Cost = 100;
  669.     boolean IsReady = false;
  670.  
  671.     @Override
  672.     public String GetName()
  673.     {
  674.         return Name;
  675.     }
  676.  
  677.     @Override
  678.     public String GetCost()
  679.     {
  680.         return null;
  681.     }
  682.  
  683.     @Override
  684.     public boolean GetIsReady()
  685.     {
  686.         return IsReady;
  687.     }
  688.     @Override
  689.     public void SetIsReady(boolean Ready)
  690.     {
  691.         IsReady = Ready;
  692.     }
  693.  
  694. }
  695.  
  696. //Corruptor
  697. package Units;
  698.  
  699. import Base_Package.IFlyingUnit;
  700.  
  701. public class Corruptor implements IFlyingUnit
  702. {
  703.     String Name = "Skaziciel";
  704.     String UnitType = "Bio";
  705.     String ArmorType = "Light";
  706.     int DMG = 5;
  707.     int DMGBonus = 0;
  708.     @Override
  709.     public String getName()
  710.     {
  711.         return Name;
  712.     }
  713.  
  714.     @Override
  715.     public String getUnitType()
  716.     {
  717.         return UnitType;
  718.     }
  719.  
  720.     @Override
  721.     public String getArmorType()
  722.     {
  723.         return ArmorType;
  724.     }
  725.  
  726.     @Override
  727.     public void SetDMGUpgrade(int NewDMGBonus)
  728.     {
  729.      DMGBonus = NewDMGBonus;
  730.     }
  731.  
  732.     @Override
  733.     public int GetDMGBonus()
  734.     {
  735.         return DMGBonus;
  736.     }
  737.  
  738.     @Override
  739.     public int GetDMG()
  740.     {
  741.         return DMG+DMGBonus;
  742.     }
  743. }
  744.  
  745. //Hydralisk
  746. package Units;
  747.  
  748. import Base_Package.IGroundUnit;
  749.  
  750. public class Hydralisk implements IGroundUnit
  751. {
  752.     String Name = "Hydralisk";
  753.     String UnitType = "Bio";
  754.     String ArmorType = "Light";
  755.     @Override
  756.     public String getName()
  757.     {
  758.         return Name;
  759.     }
  760.  
  761.     @Override
  762.     public String getUnitType()
  763.     {
  764.         return UnitType;
  765.     }
  766.  
  767.     @Override
  768.     public String getArmorType()
  769.     {
  770.         return ArmorType;
  771.     }
  772.  
  773. }
  774.  
  775. //Larva
  776. package Units;
  777.  
  778. import Base_Package.IGroundUnit;
  779.  
  780. public class Larva implements IGroundUnit
  781. {
  782.     String Name = "Larwa";
  783.     String UnitType = "Bio";
  784.     String ArmorType = "Light";
  785.     @Override
  786.     public String getName()
  787.     {
  788.         return Name;
  789.     }
  790.  
  791.     @Override
  792.     public String getUnitType()
  793.     {
  794.         return UnitType;
  795.     }
  796.  
  797.     @Override
  798.     public String getArmorType()
  799.     {
  800.         return ArmorType;
  801.     }
  802. }
  803.  
  804. //Mutalisk
  805. package Units;
  806.  
  807. import Base_Package.IFlyingUnit;
  808. import Base_Package.IGroundUnit;
  809.  
  810. public class Mutalisk implements IFlyingUnit
  811. {
  812.     String Name = "Mutalisk";
  813.     String UnitType = "Bio";
  814.     String ArmorType = "Light";
  815.     int DMG = 5;
  816.     int DMGBonus = 0;
  817.     @Override
  818.     public String getName()
  819.     {
  820.         return Name;
  821.     }
  822.  
  823.     @Override
  824.     public String getUnitType()
  825.     {
  826.         return UnitType;
  827.     }
  828.  
  829.     @Override
  830.     public String getArmorType()
  831.     {
  832.         return ArmorType;
  833.     }
  834.  
  835.     @Override
  836.     public void SetDMGUpgrade(int NewDMGBonus)
  837.     {
  838.      DMGBonus = NewDMGBonus;
  839.     }
  840.  
  841.     @Override
  842.     public int GetDMGBonus()
  843.     {
  844.         return DMGBonus;
  845.     }
  846.  
  847.     @Override
  848.     public int GetDMG()
  849.     {
  850.         return DMG+DMGBonus;
  851.     }
  852. }
  853.  
  854. //Zergling
  855. package Units;
  856.  
  857. import Base_Package.IGroundUnit;
  858.  
  859. public class Zergling implements IGroundUnit
  860. {
  861.     String Name = "Zregling";
  862.     String UnitType = "Bio";
  863.     String ArmorType = "Lekkie";
  864.     @Override
  865.     public String getName()
  866.     {
  867.         return Name;
  868.     }
  869.     @Override
  870.     public String getUnitType()
  871.     {
  872.         return UnitType;
  873.     }
  874.     @Override
  875.     public String getArmorType()
  876.     {
  877.         return ArmorType;
  878.     }
  879. }
  880.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement