Compare commits

...

1 Commits

Author SHA1 Message Date
Mat
d08d57ca78 Make a local variable with the shape
All checks were successful
continuous-integration/drone/push Build is passing
2023-05-18 01:08:34 +02:00

View File

@ -7,6 +7,8 @@ import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.Random; import java.util.Random;
import static school_project.Piece.*;
public class MapGenerator { public class MapGenerator {
private static final Random rand = new Random(); private static final Random rand = new Random();
public enum Difficulty { 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 //generate pieces