diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/CurGameInfo.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/CurGameInfo.java index 22092eac4..01c30b043 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/CurGameInfo.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/CurGameInfo.java @@ -26,15 +26,29 @@ public class CurGameInfo { public boolean confirmBTConnect; /* only used for BT */ public CurGameInfo() { - nPlayers = 3; + nPlayers = 2; boardSize = 15; players = new LocalPlayer[nPlayers]; serverRole = DeviceRole.SERVER_STANDALONE; dictName = BUILTIN_DICT; hintsNotAllowed = false; - players[0] = new LocalPlayer( "Eric"); - players[1] = new LocalPlayer( "Kati", true ); - players[2] = new LocalPlayer( "Brynn", true ); + players[0] = new LocalPlayer( "Player 1"); + players[1] = new LocalPlayer( "Player 2", true ); } + + public CurGameInfo( CurGameInfo src ) { + nPlayers = src.nPlayers; + boardSize = src.boardSize; + players = new LocalPlayer[nPlayers]; + serverRole = src.serverRole; + dictName = src.dictName; + hintsNotAllowed = src.hintsNotAllowed; + + int ii; + for ( ii = 0; ii < nPlayers; ++ii ) { + players[ii] = new LocalPlayer( src.players[ii] ); + } + } + } diff --git a/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/LocalPlayer.java b/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/LocalPlayer.java index 9b0e367d1..e6dfd73d7 100644 --- a/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/LocalPlayer.java +++ b/xwords4/android/XWords4/src/org/eehouse/android/xw4/jni/LocalPlayer.java @@ -15,6 +15,14 @@ public class LocalPlayer { password = ""; } + public LocalPlayer( LocalPlayer src ) { + isLocal = src.isLocal; + isRobot = src.isRobot; + name = src.name; + password = src.password; + secondsUsed = 0; + } + public LocalPlayer( String nm, boolean robot ) { this( nm ); isRobot = robot;