Skip to content

Commit

Permalink
feat: Improve readability by sorting auto-generated Lotto numbers
Browse files Browse the repository at this point in the history
  • Loading branch information
doxxx93 committed Oct 23, 2023
1 parent 958ed20 commit c3e6bc0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/kotlin/controller/LottoApp.kt
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class LottoApp(private val inputView: InputView, private val outputView: OutputV
private fun generateAutoLottoTickets(autoCount: Int): List<LottoTicket> {
val allPossibleNumbers = (1..45).toList()
return List(autoCount) {
val selectedNumbers = allPossibleNumbers.shuffled().take(6)
val selectedNumbers = allPossibleNumbers.shuffled().take(6).sorted()
val lottoNumbers = LottoNumbers.from(selectedNumbers)
LottoTicket(lottoNumbers, TicketType.Auto)
}
Expand Down

0 comments on commit c3e6bc0

Please sign in to comment.