Skip to content

Commit

Permalink
New version v2.1
Browse files Browse the repository at this point in the history
- New warning if a puzzle is simple (solvable in less than 7 moves)
  • Loading branch information
rubo77 committed Apr 27, 2019
1 parent 0087b5e commit d43fa11
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ or use the direct link to a compliled version here: https://github.com/rubo77/Pr
- choose all standard and next at the end of the setup choose to import project (Gradle)
- if you get any error while syncing the project, click on the links next to the
error and accept to download the missing components/add repositories and do refactor
- Disable FileSettings → Experimental → Gradle → Only sync the active variant
- choose buildAPK from the build menu

# Licence
The solver algorithm implementation is developed at [DriftingDroids](https://github.com/smack42/DriftingDroids), which is released under **GNU GPL**. Therefore the Bouncing Spere code is distributed under the same Licence.
Expand Down
1 change: 1 addition & 0 deletions app/app.iml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/blame" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/build-info" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/builds" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/bundle_manifest" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/check_manifest_result" />
<excludeFolder url="file://$MODULE_DIR$/build/intermediates/classes" />
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ android {
applicationId "com.github.sphere.bouncing"
minSdkVersion 15
targetSdkVersion 21
versionCode 3
versionName "2.0.1"
versionCode 4
versionName "2.1"
}
buildTypes {
release {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public void draw(RenderManager renderManager) {
renderManager.drawText(10, 14*ts, "Open Source:");
renderManager.setTextSize((int)(0.7*ts));
renderManager.drawText(10, 15*ts, "https://git.io/fjs5H");
renderManager.drawText(10, 17*ts, "Version: 2.0.1");
renderManager.drawText(10, 17*ts, "Version: 2.1");

super.draw(renderManager);
}
Expand Down
12 changes: 11 additions & 1 deletion app/src/main/java/istia/ei4/ProjetISTIA/GridGameScreen.java
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,16 @@ public void update(GameManager gameManager){
{
isSolved = true;
buttonSolve.setEnabled(true);
GameSolution solution = solver.getSolution();
int i=0;
for(IGameMove m : solution.getMoves()){
i++;
}
if(i<=6) {
// very simple puzzle with max 6 moves
// gameManager.requestToast("The AI found a solution in " + i + " moves.", true);
gameManager.requestToast("AI sais: this is a simple puzzle.", true);
}
}
}

Expand Down Expand Up @@ -513,7 +523,7 @@ public void sayWon()
{
if(IAMovesNumber > 0)
{
gameManager.requestToast("AI: solution found in "+IAMovesNumber+" moves.", true);
gameManager.requestToast("The AI found a solution in "+IAMovesNumber+" moves.", true);
}
else
{
Expand Down
Binary file removed download/BouncingSphere_v2-0.1.apk
Binary file not shown.
Binary file added download/BouncingSphere_v2-1.apk
Binary file not shown.

0 comments on commit d43fa11

Please sign in to comment.