fix robot having human name in config dialog

This commit is contained in:
Eric House 2022-12-13 06:13:03 -08:00
parent 988cf7f175
commit e051fa04f9
2 changed files with 5 additions and 7 deletions

View file

@ -306,6 +306,7 @@ public class CurGameInfo implements Serializable {
players[1] = new LocalPlayer( context, 1 ); players[1] = new LocalPlayer( context, 1 );
if ( standalone ) { if ( standalone ) {
players[1].setIsRobot( true ); players[1].setIsRobot( true );
players[1].name = CommonPrefs.getDefaultRobotName( context );
} else { } else {
players[1].isLocal = false; players[1].isLocal = false;
} }

View file

@ -103,13 +103,10 @@ public class LocalPlayer implements Serializable {
@Override @Override
public String toString() public String toString()
{ {
String result; String result = BuildConfig.DEBUG
if ( BuildConfig.DEBUG ) { ? String.format( "{name: %s, isLocal: %b, robotIQ: %d}",
result = String.format( "{name: %s, isLocal: %b, robotIQ: %d}", name, isLocal, robotIQ )
name, isLocal, robotIQ ); : super.toString();
} else {
result = super.toString();
}
return result; return result;
} }
} }