public void addPlayer(String namedAIName)
{
if (namedAIName.length() == 0) return;
NamedAIData namedAIData = mNamedAIDataPool.get(namedAIName);
AIPlayer cplayer = new AIPlayer(namedAIData.getAIUsed());
cplayer.mNamedAI = namedAIData;
String stratName = namedAIData.getAIStrategieSetting();
String bufstratName = namedAIData.getAIBoosterStrategieSetting();
AIStrategie st = mAIStrategiePool.get(stratName);
AIBoosterStrategie bst = mAIBoosterStrategiePool.get(bufstratName);
if (st != null) cplayer.mStrategie = st;
if (bst != null) cplayer.mBoosterStrategie = bst;
cplayer.setBoosterMode(true);
cplayer.setSelectedDeckName("Booster");
MatchComputerPlayer player = new MatchComputerPlayer(cplayer);
BoosterPlayer p = new BoosterPlayer();
ComputerQuickPanel panel = new ComputerQuickPanel();
panel.setParent(this);
panel.setNumber(mPlayers.size());
//p.name = namedAIName;
p.name = namedAIData.getNamedName();
p.type = player.getPlayerType();
p.no = mPlayers.size()+playerAvailable;
p.cplayer = player;
p.panel = panel;
jPanel3.add(panel);
panel.setActive(false);
panel.setName(p.name);
try
{
Image image = csa.util.UtilityImage.loadImage(namedAIData.getImagePath());
jLabel1.setText("");
panel.setIcon(new ImageIcon(image.getScaledInstance(40, 48, java.awt.Image.SCALE_SMOOTH)));
}
catch(Throwable e) {}