String password = username;
CurrentBoard board = new CurrentBoard();
ClientFramework client = new MarboardClientFramework(board);
client.connect(server, 4851);
AccountResult account = client.createAccount(username, password, "email@mailinator.com");
if (account.getResult() == Result.OK_CREATED) {
client.login(username, password);
CharacterResult character = client.createCharacter(username, new RPObject());
logger.info("Creating character: " + character.getResult());
} else {
if (account.getResult() == Result.FAILED_PLAYER_EXISTS) {
client.login(username, password);
} else {
logger.error(account);
}
}