diff --git a/src/CreaterGeneric.java b/src/CreaterGeneric.java index 692c0c7..988034c 100644 --- a/src/CreaterGeneric.java +++ b/src/CreaterGeneric.java @@ -10,7 +10,7 @@ public class CreaterGeneric(warshipsCount); Blocks=new ArrayList<>(blocksCount); } - public int AddWarship(T warship){ + public int Add(T warship){ if(WarshipsCount<=Warships.size()){ Warships.add(warship); WarshipsCount++; @@ -18,7 +18,7 @@ public class CreaterGeneric { @@ -80,7 +80,7 @@ public class FormCreater extends JDialog{ if(fblock==null) return; fblock.SetBlockCount(block.GetBlockCount()); - createrGeneric.AddBlock(fblock); + createrGeneric.Add(fblock); }); TriangleFormRadioButton.addActionListener(e -> { @@ -91,7 +91,7 @@ public class FormCreater extends JDialog{ if(fblock==null) return; fblock.SetBlockCount(block.GetBlockCount()); - createrGeneric.AddBlock(fblock); + createrGeneric.Add(fblock); }); BasicRadioButton.addActionListener(e -> { @@ -99,7 +99,7 @@ public class FormCreater extends JDialog{ if(Integer.parseInt(SpeedTextField.getText())==0 || Integer.parseInt(WeightTextField.getText())==0 || color==null){ return; } - createrGeneric.AddWarship(new EntityWarship(Integer.parseInt(SpeedTextField.getText()),Integer.parseInt(WeightTextField.getText()),color)); + createrGeneric.Add(new EntityWarship(Integer.parseInt(SpeedTextField.getText()),Integer.parseInt(WeightTextField.getText()),color)); }); AdvancedRadioButton.addActionListener(e -> { @@ -111,7 +111,7 @@ public class FormCreater extends JDialog{ if(color2==null){ return; } - createrGeneric.AddWarship(new EntityAdvancedWarship(Integer.parseInt(SpeedTextField.getText()),Integer.parseInt(WeightTextField.getText()), + createrGeneric.Add(new EntityAdvancedWarship(Integer.parseInt(SpeedTextField.getText()),Integer.parseInt(WeightTextField.getText()), color1,color2,HelipadCheckBox.isSelected(),AntennaCheckBox.isSelected(),MissileCheckBox.isSelected())); });