From 2cd1fb98f818ade02c9073b85b53cebf5eb473bf Mon Sep 17 00:00:00 2001 From: AnnZhimol Date: Wed, 16 Nov 2022 10:43:12 +0400 Subject: [PATCH] =?UTF-8?q?=D0=9A=D0=BE=D1=80=D1=80=D0=B5=D0=BA=D1=82?= =?UTF-8?q?=D0=B8=D1=80=D0=BE=D0=B2=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/CreaterGeneric.java | 4 ++-- src/FormCreater.java | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) 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())); });