when there's no move made yet to display after score entry held say

so.
This commit is contained in:
Andy2 2011-09-02 19:24:42 -07:00
parent e4b952222a
commit 3fd0bb056a
2 changed files with 7 additions and 3 deletions

View file

@ -119,7 +119,7 @@
<string name="strs_new_tiles">New tiles: %s</string>
<string name="str_passed">Passed</string>
<string name="strsd_summaryscored">%1$s:%2$d</string>
<string name="strd_traded">Traded %d</string>
<string name="strd_traded">Exchanged %d tiles</string>
<string name="str_lostturn">Lost turn</string>
<string name="str_commit_confirm">Commit the current move?\n</string>
<string name="str_nonlocal_namef">%s (remote)</string>
@ -609,4 +609,6 @@
when creating new games. (You can change it later in the \"New
game default\" section of Settings.)</string>
<string name="no_moves_made">(No moves yet)</string>
</resources>

View file

@ -934,9 +934,11 @@ public class BoardActivity extends XWActivity
{
String expl = XwJNI.model_getPlayersLastScore( m_jniGamePtr,
player );
if ( expl.length() == 0 ) {
expl = getString( R.string.no_moves_made );
}
String name = m_gi.players[player].name;
final String text = expl.length() > 0 ?
String.format( "%s\n%s", name, expl ) : name;
final String text = String.format( "%s\n%s", name, expl );
post( new Runnable() {
public void run() {
Toast.makeText( BoardActivity.this, text,