Изменил(а) на 'FormParameterClass.java'

This commit is contained in:
Zhelovanov_Dmitrii 2022-12-22 22:01:16 +04:00
parent 9a93dd2af5
commit 7384aa9514

View File

@ -27,8 +27,8 @@ public class FormParameterClass extends JComponent {
Random random = new Random();
int[] arrayBlocks = {2, 4, 6};
if (parameterClass == null) {
parameterClass = new MyParametrClass<EntityBattleship, IDrawningBlocks>(5, 5);
for (int i = 0; i < 5; i ++) {
parameterClass = new MyParametrClass<EntityBattleship, IDrawningBlocks>(20, 20);
for (int i = 0; i < 20; i ++) {
if (random.nextBoolean()) {
parameterClass.Insert(new EntityBattleship(random.nextInt(100), random.nextInt(100),
new Color(random.nextInt(255),random.nextInt(255),random.nextInt(255))));
@ -40,7 +40,7 @@ public class FormParameterClass extends JComponent {
random.nextBoolean(), random.nextBoolean()));
}
}
for (int i = 0; i < 5; i ++) {
for (int i = 0; i < 20; i ++) {
int rnd = random.nextInt(3);
switch (rnd) {