clean: improve code structure
This commit is contained in:
@@ -49,12 +49,11 @@ public class Space {
|
||||
Color[][] tempGameMap = new Color[gameMap.length][gameMap[0].length];
|
||||
for (int y = 0; y < tempGameMap.length; y++) {
|
||||
System.arraycopy(gameMap[y], 0, tempGameMap[y], 0, tempGameMap[y].length);
|
||||
if (currentTetromino != null) {
|
||||
Color[] newBlobs = currentTetromino.getLine(y);
|
||||
for (int i = 0; i < newBlobs.length; i++) {
|
||||
if (newBlobs[i] == null) continue;
|
||||
tempGameMap[y][i] = newBlobs[i];
|
||||
}
|
||||
if (currentTetromino == null) continue;
|
||||
Color[] newBlobs = currentTetromino.getLine(y);
|
||||
for (int i = 0; i < newBlobs.length; i++) {
|
||||
if (newBlobs[i] == null) continue;
|
||||
tempGameMap[y][i] = newBlobs[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user