mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-04 09:11:39 +00:00
App class refactor
This commit is contained in:
parent
09f0f755eb
commit
b59fc753c5
@ -3,9 +3,7 @@ package com.gildedrose
|
||||
import com.gildedrose.data.constants.ItemRepository
|
||||
|
||||
class App(private val glidedRose: GildedRose) {
|
||||
var days: Int = 2
|
||||
|
||||
fun printGlideRoseTable() {
|
||||
fun printGlideRoseTable(days: Int) {
|
||||
welcomeMessage()
|
||||
repeat(days) { day ->
|
||||
printTableHeader(day)
|
||||
@ -37,6 +35,5 @@ fun main(args: Array<String>) {
|
||||
days = Integer.parseInt(args[0]) + 1
|
||||
}
|
||||
|
||||
app.days = days
|
||||
app.printGlideRoseTable()
|
||||
app.printGlideRoseTable(days)
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user