mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-04 09:11:39 +00:00
Refactor days
This commit is contained in:
parent
1313648b66
commit
32edb8321c
@ -6,9 +6,9 @@ fun main(args: Array<String>) {
|
||||
|
||||
val app = App(GildedRose(ItemRepository.items))
|
||||
|
||||
var days = 2
|
||||
if (args.size > 0) {
|
||||
days = Integer.parseInt(args[0]) + 1
|
||||
val days = when {
|
||||
args.isNotEmpty() -> Integer.parseInt(args[0]) + 1
|
||||
else -> 2
|
||||
}
|
||||
|
||||
app.printGlideRoseTable(days)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user