From d08d57ca7806c1ff9aa16ea7b3128388bf5ca7ef Mon Sep 17 00:00:00 2001 From: Mat Date: Thu, 18 May 2023 01:08:34 +0200 Subject: [PATCH] Make a local variable with the shape --- app/src/main/java/school_project/MapGenerator.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/school_project/MapGenerator.java b/app/src/main/java/school_project/MapGenerator.java index f4728e5..b9af025 100644 --- a/app/src/main/java/school_project/MapGenerator.java +++ b/app/src/main/java/school_project/MapGenerator.java @@ -7,6 +7,8 @@ import java.util.Arrays; import java.util.Collections; import java.util.Random; +import static school_project.Piece.*; + public class MapGenerator { private static final Random rand = new Random(); public enum Difficulty { @@ -93,7 +95,9 @@ public class MapGenerator { } } } - ret.addPiece(new Piece(shape)); + boolean[][] turnPiece = shape; + + ret.addPiece(new Piece(turnPiece)); } //generate pieces