diff --git a/src/BlockCount.java b/src/BlockCount.java index b49dbfe..3f4fbbd 100644 --- a/src/BlockCount.java +++ b/src/BlockCount.java @@ -3,11 +3,11 @@ public enum BlockCount { FourBlocks(4), SixBlocks(6); - private final int value; + private final int Value; BlockCount(int count){ - value=count; + Value=count; } public int GetBlockCount(){ - return value; + return Value; } } diff --git a/src/DrawingBlock.java b/src/DrawingBlock.java index 0189e61..28b00fe 100644 --- a/src/DrawingBlock.java +++ b/src/DrawingBlock.java @@ -2,18 +2,18 @@ import java.awt.*; public class DrawingBlock { - private BlockCount _Block; + private BlockCount _block; public void SetBlockCount(int count){ for (BlockCount temp: BlockCount.values()) if (temp.GetBlockCount() == count){ - _Block=temp; + _block=temp; return; } } public void DrawBlock(Graphics2D g,int _startPosX, int _startPosY) { - if (_Block.GetBlockCount() >= 2) { + if (_block.GetBlockCount() >= 2) { g.setColor(Color.GRAY); g.fillRect(_startPosX + 25, _startPosY + 10, 10, 10); g.setColor(Color.BLACK); @@ -23,7 +23,7 @@ public class DrawingBlock { g.setColor(Color.BLACK); g.drawRect(_startPosX + 25, _startPosY + 20, 10, 10); } - if (_Block.GetBlockCount() >= 4) { + if (_block.GetBlockCount() >= 4) { g.setColor(Color.GRAY); g.fillRect(_startPosX+35,_startPosY+10,10,10); g.setColor(Color.BLACK); @@ -33,7 +33,7 @@ public class DrawingBlock { g.setColor(Color.BLACK); g.drawRect(_startPosX+35,_startPosY+20,10,10); } - if (_Block.GetBlockCount() >= 6) { + if (_block.GetBlockCount() >= 6) { g.setColor(Color.GRAY); g.fillRect(_startPosX+45,_startPosY+10,10,10); g.setColor(Color.BLACK); diff --git a/src/DrawingField.java b/src/DrawingField.java index 3c4fa0f..966b0a7 100644 --- a/src/DrawingField.java +++ b/src/DrawingField.java @@ -3,10 +3,10 @@ import java.awt.*; import java.util.Random; public class DrawingField extends JPanel { - private final FormWarship field; + private final FormWarship Field; DrawingWarship _warship; public DrawingField(FormWarship field) { - this.field = field; + this.Field = field; } @Override protected void paintComponent(Graphics g) { @@ -45,9 +45,9 @@ public class DrawingField extends JPanel { _warship=new DrawingWarship(); _warship.Init(rand.nextInt(50)+10,rand.nextInt(3000)+20000,new Color(rand.nextInt(256),rand.nextInt(256),rand.nextInt(256))); _warship.SetPosition(rand.nextInt(100)+10,rand.nextInt(100)+10,getWidth(),getHeight()); - field.SpeedLabel.setText("Скорость: "+_warship.GetWarship().GetSpeed()); - field.WeightLabel.setText("Вес: "+_warship.GetWarship().GetWeight()); - field.BodyColorLabel.setText("Цвет: "+Integer.toHexString(_warship.GetWarship().GetBodyColor().getRGB()).substring(2)); + Field.SpeedLabel.setText("Скорость: "+_warship.GetWarship().GetSpeed()); + Field.WeightLabel.setText("Вес: "+_warship.GetWarship().GetWeight()); + Field.BodyColorLabel.setText("Цвет: "+Integer.toHexString(_warship.GetWarship().GetBodyColor().getRGB()).substring(2)); } public void ResizeField(){ if (_warship!=null)