From: gumartinm Date: Sun, 6 Nov 2011 23:32:21 +0000 (+0100) Subject: Some changes left :S X-Git-Url: https://git.gumartinm.name/?a=commitdiff_plain;h=4ec7ea882c2c211a43b40fbadfefb9760681f3a9;p=JavaForFun Some changes left :S This is a personal project so, I do whatever I want XD. In the real world I would save this commit for another moment. --- diff --git a/AndroidTetris/src/de/android/androidtetris/Piece.java b/AndroidTetris/src/de/android/androidtetris/Piece.java index a9c13f8..cbef91b 100644 --- a/AndroidTetris/src/de/android/androidtetris/Piece.java +++ b/AndroidTetris/src/de/android/androidtetris/Piece.java @@ -90,7 +90,7 @@ public enum Piece { //Every piece is contained in a square. This is the square's height. private static final int HEIGHT = 4; //Every piece is contained in a square. - public Tile[][] size = new Tile[WIDTH][HEIGHT]; + public final Tile[][] size = new Tile[WIDTH][HEIGHT]; //Stores the x coordinate (the position of this piece on the grid) public int x = 0; //Stores the y coordinate (the position of this piece on the grid) diff --git a/AndroidTetris/src/de/android/androidtetris/Tile.java b/AndroidTetris/src/de/android/androidtetris/Tile.java index b1e162d..5bb79b1 100644 --- a/AndroidTetris/src/de/android/androidtetris/Tile.java +++ b/AndroidTetris/src/de/android/androidtetris/Tile.java @@ -82,7 +82,7 @@ public enum Tile { //Stores the argument of the enum constant (passed to the constructor) JLS§8.9.1 - private int color; + private final int color; /** @@ -91,7 +91,7 @@ public enum Tile { * * @param color It is the argument of the enum constant */ - Tile (int color) + Tile (final int color) { this.color = color; }