https://kotlinlang.org logo
a

amanda.hinchman-dominguez

05/21/2018, 4:50 AM
rewriting in the controller was fine but I couldn't quite figure out how to assign the position for just the image.
Copy code
fun housePane(position: Pos): StackPane {
        val houseNum = (1..6).random()
        val rectangle = Rectangle(100.0, 100.0, c("4E9830"))
        val image =  ImageView("house$houseNum.png")
        val stackPane = StackPane(rectangle, image)
        stackPane.alignment = rectangle, ???
        return StackPane(rectangle, image)
    }