mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-02-10 20:21:26 +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
|
import com.gildedrose.data.constants.ItemRepository
|
||||||
|
|
||||||
class App(private val glidedRose: GildedRose) {
|
class App(private val glidedRose: GildedRose) {
|
||||||
var days: Int = 2
|
fun printGlideRoseTable(days: Int) {
|
||||||
|
|
||||||
fun printGlideRoseTable() {
|
|
||||||
welcomeMessage()
|
welcomeMessage()
|
||||||
repeat(days) { day ->
|
repeat(days) { day ->
|
||||||
printTableHeader(day)
|
printTableHeader(day)
|
||||||
@ -37,6 +35,5 @@ fun main(args: Array<String>) {
|
|||||||
days = Integer.parseInt(args[0]) + 1
|
days = Integer.parseInt(args[0]) + 1
|
||||||
}
|
}
|
||||||
|
|
||||||
app.days = days
|
app.printGlideRoseTable(days)
|
||||||
app.printGlideRoseTable()
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user