Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found
Select Git revision

Target

Select target project
  • android/org.benoitharrault.jeweled
1 result
Select Git revision
Show changes
Commits on Source (2)
org.gradle.jvmargs=-Xmx1536M
android.useAndroidX=true
android.enableJetifier=true
app.versionName=0.0.10
app.versionCode=10
app.versionName=0.0.11
app.versionCode=11
Improve pick new color.
Amélioration de la sélection de couleur.
......@@ -184,23 +184,25 @@ class Game {
// build a list of values to pick one
final List<int> values = [];
// All eligible values
// All eligible values (twice)
final int maxValue = this.settings.colorsCount;
for (int i = 1; i <= maxValue; i++) {
values.add(i);
values.add(i);
}
// Add values of current col
// Add values of current col (twice)
for (int r = 0; r <= this.settings.boardSize; r++) {
if (this.isInBoard(CellLocation.go(r, col))) {
final int? value = this.getCellValue(CellLocation.go(r, col));
if (value != null) {
values.add(value);
values.add(value);
}
}
}
// Add values of sibling cols
// Add values of sibling cols (twice for top rows)
for (int deltaCol = -1; deltaCol <= 1; deltaCol++) {
final int c = col + deltaCol;
for (int r = 0; r < this.settings.boardSize; r++) {
......@@ -208,6 +210,9 @@ class Game {
final int? value = this.getCellValue(CellLocation.go(r, c));
if (value != null) {
values.add(value);
if (row < this.settings.boardSize / 3) {
values.add(value);
}
}
}
}
......
......@@ -3,7 +3,7 @@ description: Jeweled Game
publish_to: 'none'
version: 0.0.10+10
version: 0.0.11+11
environment:
sdk: '^3.0.0'
......