package com.seizure;
class Player
{
public int StepsCount = 0;
public int OwnedCellsCount = 0;
public boolean HasFreeCell = true;
public boolean Enabled = false;
public boolean IsAI = false;
public int AiLevel;
private String Name;
public int GameFieldCornerIndex;
public int BorderColor;
private Player()
{}
public Player(String name, boolean isAI, int aiLevel)
{
IsAI = isAI;
Name = name;
if(isAI)
{
AiLevel = aiLevel;
}
}
public void setName(String name)
{
Name = name;
}
public String getName()
{
return Name + (IsAI ? " (AI="+AiLevel+")":"");
}
public void Reset()
{
OwnedCellsCount = 0;
StepsCount = 0;
HasFreeCell = true;
}
public Player clone()
{
Player p = new Player();
p.Name = Name;
p.StepsCount = StepsCount;
p.OwnedCellsCount = OwnedCellsCount;
p.HasFreeCell = HasFreeCell;
p.Enabled = Enabled;
p.IsAI = IsAI;
p.AiLevel = AiLevel;
p.GameFieldCornerIndex = GameFieldCornerIndex;
return p;
}
}
|