Skip to content

Instantly share code, notes, and snippets.

@GeePawHill

GeePawHill/YzView.kt

Created Dec 27, 2020
Embed
What would you like to do?
To TDD or not to TDD?
package org.geepawhill.yz
import tornadofx.*
class YzView : View() {
val model = YzModel(YzGame())
override val root = pane {
hbox {
button("Start") {
action { model.start() }
}
button("Roll") {
enableWhen(model.canRoll)
action { model.roll() }
}
model.dice.forEach {
imageview {
imageProperty().bind(it.imageReadOnly)
}
label(it.pipsReadOnly)
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment