}
protected void start() throws RemoteException, LoginException, IllegalActionException {
RemoteServerContext conn = server.login("foobar", "foobar");
SmartClientContext clientContext = new SmartClientContext(conn);
final SmartLobbyContext lobbyContext = clientContext.getLobbyContext(new DefaultLobbyListener());
final PlayerId botId = clientContext.getAccountContext().getPlayerID();
final SingleThreadRequestExecutor executor = SingleThreadRequestExecutor.getInstance();
final TableId tableId = new TableId(0);
bot = botFactory.createBot(botId, tableId, lobbyContext, 200000, executor, new DefaultBotListener() {
@Override
public void onSitOut(SitOutEvent sitOutEvent) {
if(botId.equals(sitOutEvent.getPlayerId())){
logger.info("Sitting in again after "+sitOutEvent);
bot.reSitIn();
}
}
}, new ProfitListener(1,new ProfitInfo(){
@Override
public RunningStats getProfit() {
return bot.getProfit();
}
@Override
public String getBotName() {
return botFactory.toString();
}
@Override
public TableConfiguration getTableConfiguration() {
try {
return lobbyContext.getHoldemTableInformation(tableId).getTableConfiguration();
} catch (RemoteException e) {
e.printStackTrace();
logger.error(e);
throw new RuntimeException(e);
} catch (IllegalActionException e) {