Array of Types

Blitz3D Forums/Blitz3D Beginners Area/Array of Types

Josaih6/10(Posted 2009) [#1]
I am trying to make a minesweeper game. I have a type for each space, contaning a t/f field mined, an image-handle for the box field BIm, and a number field n. How do I make an array with this type and then use its instances through that array.


Warner(Posted 2009) [#2]
Dim grid.TSpace(39, 39)

for i = 0 to 39
for j = 0 to 39
   grid(i, j) = new TSpace
   grid(i, j)\mined = 0
   grid(i, j)\BIm = LoadImage("test.bmp")
   grid(i, j)\n   = i * 40 + j
next
next



Josaih6/10(Posted 2009) [#3]
thank you!!!