Created
December 27, 2020 17:35
-
-
Save GeePawHill/062d61f6ac0807145ac07a2678755485 to your computer and use it in GitHub Desktop.
To TDD or not to TDD?
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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