Skip to content

Commit

Permalink
refactor: small corrections
Browse files Browse the repository at this point in the history
  • Loading branch information
xeruf committed Jun 13, 2024
1 parent 28b1f90 commit 5d337e2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ enum class MoveMistake(override val message: String) : IMoveMistake {
PUSH_ACTION_REQUIRED("Wenn du auf einem gegnerischen Schiff landest, muss darauf eine Abdrängaktion folgen."),
SAND_BANK_END("Zug auf eine Sandbank muss letzte Aktion sein."),
FIRST_ACTION_ACCELERATE("Du kannst nur in der ersten Aktion beschleunigen."),
MOVEMENT_POINTS_LEFT("Es sind noch Bewegungspunkte übrig."),
MOVEMENT_POINTS_LEFT("Nicht alle Bewegungspunkte verbraucht."),
MOVEMENT_POINTS_MISSING("Nicht genug Bewegungspunkte.");
}
2 changes: 1 addition & 1 deletion sdk/src/main/framework/sc/shared/PlayerScore.kt
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ data class PlayerScore(
fun toString(definition: ScoreDefinition): String {
if(!matches(definition))
throw IllegalArgumentException("$definition does not match $this")
return "PlayerScore[${parts.withIndex().joinToString { "${definition[it.index].name}=${it.value}" }}]"
return "PlayerScore[${parts.withIndex().joinToString { (index, value) -> "${definition[index].name}=${value}" }}]"
}

override fun toString(): String = "PlayerScore(${parts.contentToString()})"
Expand Down

0 comments on commit 5d337e2

Please sign in to comment.