Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fedepaol committed Jan 19, 2011
1 parent 9aa2d76 commit 79bd1f7
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
5 changes: 3 additions & 2 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@
<string name="do_you_want_to_restore">Do you want to restore previous saved game?</string>
<string name="starting_new_game">Do you want to start new game?</string>
<string name="stall">Stall</string>
<string name="no_more_moves">No more moves available. \n Score %d. Do you want to start new game?</string>
<string name="no_more_moves_record">New Record! \n New Record: %1$d \n Old Record %2$d Do you want to start new game?</string>
<string name="new_record">New Record!</string>
<string name="no_more_moves">No more moves available. \nScore %d. Do you want to start new game?</string>
<string name="no_more_moves_record">New Score: %1$d \nOld Record %2$d\nDo you want to start new game?</string>


</resources>
2 changes: 1 addition & 1 deletion src/com/fede/checkers/boards/CheckersDbHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ public int getBoardMaxScore(String name){
res.moveToFirst();
if(res.getCount() <= 0){
res.close();
return 9;
return 0;
}

int result = res.getInt(BOARDSCORE_MAXSCORE_COLUMN);
Expand Down
4 changes: 3 additions & 1 deletion src/com/fede/checkers/ui/ChineseCheckers.java
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,14 @@ public void onGameStall(long thisGameScore){
String button1String = getString(R.string.new_game);
String cancelString = getString(R.string.back);
AlertDialog.Builder ad = new AlertDialog.Builder(this);
ad.setTitle(getString(R.string.stall));


int oldScore = getOldScore();
if(thisGameScore > oldScore){
ad.setTitle(getString(R.string.new_record));
ad.setMessage(String.format(getString(R.string.no_more_moves_record), thisGameScore, oldScore));
}else{
ad.setTitle(getString(R.string.stall));
ad.setMessage(String.format(getString(R.string.no_more_moves), thisGameScore));
}

Expand Down

0 comments on commit 79bd1f7

Please sign in to comment.