From 7467abfd1195e4dffb6e6f70abdee069d3540b0d Mon Sep 17 00:00:00 2001 From: Anthony Debucquoy Date: Fri, 19 May 2023 14:55:48 +0200 Subject: [PATCH] Random rotation to generated maps --- app/src/main/java/school_project/MapGenerator.java | 4 +++- 1 file changed, 3 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..6d059e9 100644 --- a/app/src/main/java/school_project/MapGenerator.java +++ b/app/src/main/java/school_project/MapGenerator.java @@ -93,7 +93,9 @@ public class MapGenerator { } } } - ret.addPiece(new Piece(shape)); + Piece piece = new Piece(shape); + piece.RotateRight(rand.nextInt(4)); + ret.addPiece(piece); } //generate pieces -- 2.46.0