Dimension only needs to be able to hold two properties: width and height. As such, it is a perfect candidate for the utilization of a data class. Add the following private class to the TetrisView class:
private data class Dimension(val width: Int, val height: Int)
The preceding one-liner provides us with the properties, as well as the setter and getters we need for them.