<item>Hard</item>
</string-array>
<string-array name="difficulty_values">
-
- <item >2</item><item>1</item>
+ <item>1</item>
+ <item>2</item>
</string-array>
<string-array name="size_values">
- <item >1</item>
- <item >2</item>
- <item >3</item>
+ <item>1</item>
+ <item>2</item>
+ <item>3</item>
</string-array>
-
</resources>
this.difficulty=difficulty;
this.gravity=gravity;
- int numDifferentPieces=((boardSize[0]-2)*(boardSize[1]-2)/((difficulty+1)*2))+1;
- for (int n=0;n<((difficulty+1)*2);n++) {
- for (int k=0;k<numDifferentPieces;k++) {
+ int numDifferentPieces=((boardSize[0]-2)*(boardSize[1]-2)/((4-difficulty)*2))+1;
+ for (int n=0; n<((4-difficulty)*2); n++) {
+ for (int k=0; k<numDifferentPieces; k++) {
int i,j;
do {
j=(myrand() % (boardSize[1]-2))+1;