Zhelovanov D.Y. LabWork03 #3
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user