);
}
- private static void printPlayer(Player player) {
+ private static void printPlayer(Player player) throws APIException {
SnookerScoreConsole.console(
String.format(
- "%s%s %s [%s] (%s)",
+ "%s%s [%s] (%s)",
INDENT,
- player.surnameFirst() ? player.lastName() : player.firstName(),
- player.surnameFirst() ? player.firstName() : player.lastName(),
+ player.fullName(),
SnookerDateUtils.formatDate(player.born()),
player.nationality()
)
Player player2 = api.getPlayer(match.player2Id());
SnookerScoreConsole.console(
String.format(
- "%s[%s %s - %s] %s %s %s-%s %s %s",
+ "%s[%s %s - %s] %s %s-%s %s",
INDENT,
SnookerDateUtils.formatDate(match.startDate()),
SnookerDateUtils.formatTime(match.startDate()),
SnookerDateUtils.formatTime(match.endDate()),
- player1.surnameFirst() ? player1.lastName() : player1.firstName(),
- player1.surnameFirst() ? player1.firstName() : player1.lastName(),
+ player1.fullName(),
match.score1(),
match.score2(),
- player2.surnameFirst() ? player2.lastName() : player2.firstName(),
- player2.surnameFirst() ? player2.firstName() : player2.lastName()
+ player2.fullName()
)
);
}
Player player = api.getPlayer(seeding.playerId());
SnookerScoreConsole.console(
String.format(
- "%s%s. %s %s",
+ "%s%s. %s",
indent,
seeding.seeding(),
- player.surnameFirst() ? player.lastName() : player.firstName(),
- player.surnameFirst() ? player.firstName() : player.lastName()
+ player.fullName()
)
);
}