mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
add constructor that names player by position in game. (Template
needs to come from strings.xml)
This commit is contained in:
parent
171318156d
commit
dd05c5b58e
1 changed files with 10 additions and 9 deletions
|
@ -1,3 +1,4 @@
|
|||
/* -*- compile-command: "cd ../../../../../../; ant reinstall"; -*- */
|
||||
|
||||
package org.eehouse.android.xw4.jni;
|
||||
|
||||
|
@ -8,24 +9,24 @@ public class LocalPlayer {
|
|||
public boolean isRobot;
|
||||
public boolean isLocal;
|
||||
|
||||
public LocalPlayer( String nm ) {
|
||||
private LocalPlayer() {}
|
||||
|
||||
public LocalPlayer( int num )
|
||||
{
|
||||
isLocal = true;
|
||||
isRobot = false;
|
||||
name = nm;
|
||||
// This should be a template in strings.xml
|
||||
name = "Player " + (num + 1);
|
||||
password = "";
|
||||
}
|
||||
|
||||
public LocalPlayer( LocalPlayer src ) {
|
||||
public LocalPlayer( final 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;
|
||||
secondsUsed = src.secondsUsed;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue