Fix tables number export bug
This commit is contained in:
@@ -242,11 +242,11 @@ object OpenGotha {
|
|||||||
<Games>
|
<Games>
|
||||||
// TODO - table number is not any more kinda random like this
|
// TODO - table number is not any more kinda random like this
|
||||||
${(1..tournament.lastRound()).map { tournament.games(it) }.flatMapIndexed { index, games ->
|
${(1..tournament.lastRound()).map { tournament.games(it) }.flatMapIndexed { index, games ->
|
||||||
games.values.mapIndexedNotNull { table, game ->
|
games.values.mapNotNull { game ->
|
||||||
if (game.black == 0 || game.white == 0) null
|
if (game.black == 0 || game.white == 0) null
|
||||||
else Triple(index + 1, table , game)
|
else Pair(index + 1, game)
|
||||||
}
|
}
|
||||||
}.joinToString("\n") { (round, table, game) ->
|
}.joinToString("\n") { (round, game) ->
|
||||||
"""<Game blackPlayer="${
|
"""<Game blackPlayer="${
|
||||||
(tournament.pairables[game.black]!! as Player).let { black ->
|
(tournament.pairables[game.black]!! as Player).let { black ->
|
||||||
"${black.name.replace(" ", "")}${black.firstname.replace(" ", "")}".uppercase(Locale.ENGLISH) // Use Locale.ENGLISH to transform é to É
|
"${black.name.replace(" ", "")}${black.firstname.replace(" ", "")}".uppercase(Locale.ENGLISH) // Use Locale.ENGLISH to transform é to É
|
||||||
@@ -263,7 +263,7 @@ object OpenGotha {
|
|||||||
}" roundNumber="${
|
}" roundNumber="${
|
||||||
round
|
round
|
||||||
}" tableNumber="${
|
}" tableNumber="${
|
||||||
table + 1
|
game.table
|
||||||
}" whitePlayer="${
|
}" whitePlayer="${
|
||||||
(tournament.pairables[game.white]!! as Player).let { white ->
|
(tournament.pairables[game.white]!! as Player).let { white ->
|
||||||
"${white.name}${white.firstname}".uppercase(Locale.ENGLISH) // Use Locale.ENGLISH to transform é to É
|
"${white.name}${white.firstname}".uppercase(Locale.ENGLISH) // Use Locale.ENGLISH to transform é to É
|
||||||
|
Reference in New Issue
Block a user