Revision fdec60a3
Added by Leszek Koltunski over 4 years ago
src/main/java/org/distorted/magic/RubikActivity.java | ||
---|---|---|
1 | 1 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
2 | 2 |
// Copyright 2019 Leszek Koltunski // |
3 | 3 |
// // |
4 |
// This file is part of Distorted. //
|
|
4 |
// This file is part of Magic Cube. //
|
|
5 | 5 |
// // |
6 |
// Distorted is free software: you can redistribute it and/or modify //
|
|
6 |
// Magic Cube is free software: you can redistribute it and/or modify //
|
|
7 | 7 |
// it under the terms of the GNU General Public License as published by // |
8 | 8 |
// the Free Software Foundation, either version 2 of the License, or // |
9 | 9 |
// (at your option) any later version. // |
10 | 10 |
// // |
11 |
// Distorted is distributed in the hope that it will be useful, //
|
|
11 |
// Magic Cube is distributed in the hope that it will be useful, //
|
|
12 | 12 |
// but WITHOUT ANY WARRANTY; without even the implied warranty of // |
13 | 13 |
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // |
14 | 14 |
// GNU General Public License for more details. // |
15 | 15 |
// // |
16 | 16 |
// You should have received a copy of the GNU General Public License // |
17 |
// along with Distorted. If not, see <http://www.gnu.org/licenses/>. //
|
|
17 |
// along with Magic Cube. If not, see <http://www.gnu.org/licenses/>. //
|
|
18 | 18 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
19 | 19 |
|
20 | 20 |
package org.distorted.magic; |
... | ... | |
37 | 37 |
|
38 | 38 |
public class RubikActivity extends AppCompatActivity |
39 | 39 |
{ |
40 |
static final int DEFAULT_SIZE = 3;
|
|
41 |
private static final int SMALLEST_SIZE = 2;
|
|
40 |
static final int DEFAULT_SIZE = 3; |
|
41 |
static final int SMALLEST_SIZE = 2; |
|
42 | 42 |
private static final int[] button_ids = {R.id.rubikSize2, R.id.rubikSize3, R.id.rubikSize4, R.id.rubikSize5}; |
43 | 43 |
|
44 | 44 |
public static final int MIN_SCRAMBLE = 1; |
... | ... | |
109 | 109 |
return mSize; |
110 | 110 |
} |
111 | 111 |
|
112 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
|
113 |
|
|
114 |
static int getNumCubes() |
|
115 |
{ |
|
116 |
return button_ids.length; |
|
117 |
} |
|
118 |
|
|
112 | 119 |
/////////////////////////////////////////////////////////////////////////////////////////////////// |
113 | 120 |
|
114 | 121 |
@Override |
Also available in: Unified diff
Skeleton of a new dialog: High Scores