Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
FillTiles inside the game class.Method FillTiles:Int()
Local filled:Bool = False Local filled2:Bool = False
For Local r:Int = rows To 1 Step -1 For Local c:Int = columns To 1 Step -1
filled2 to False and check if the tile map is in the initial position (= -1).filled2 = False If tileMap[c-1][r-1] = -1 Then
If r > 1 Then
For Local r2:Int = r-1 To 1 Step -1