title: Kotlin 2d Array initialization
body: <p>Please take a look at my 2D-Array-Initialization. The code works.</p>
  
  <pre><code>class World(val size_x: Int = 256, val size_y: Int = 256) {
  
    var worldTiles = Array(size_x, { Array(size_y, { WorldTile() }) })
  
      fun generate() {
        for( x in 0..size_x-1 ) {
            for( y in 0..size_y-1 ) {
                worldTiles[x][y] = WorldTile()
            }
        }
    }
  }
  </code></pre>
  
  <p>The problem is that it runs the initialization twice. Basically I want to instantiate the WorldTile-Object in the generate() function. So Line 3 shouldn't call "new WorldTile" there. How can I do that?</p>
  
  <p>Also is that the proper Kotlin way of traversing a 2d-Array?</p>