From 4ec7ea882c2c211a43b40fbadfefb9760681f3a9 Mon Sep 17 00:00:00 2001 From: gumartinm Date: Mon, 7 Nov 2011 00:32:21 +0100 Subject: [PATCH] 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. --- AndroidTetris/src/de/android/androidtetris/Piece.java | 2 +- AndroidTetris/src/de/android/androidtetris/Tile.java | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.1.4