/**
 * Returns the maximum value in the gameField matrix.
 */
private int getMaxTileValue() {
    int max = 2;
    for (int x = 0; x < SIDE; x ++) {
        for (int y = 0; y < SIDE; y++) {
            max = Math.max(gameField[x][y], max);
        }
    }
    return max;
}