Aug 8, 2013

Minesweeper Test in Cinema 4D

Hi,
how to create multidimensional array in python ?
that's what I was looking for :)

in java it's quite easy, for instance, to create Integer array ;
int[][] arrayName = { {0,1,2} , {0,1,2} };  
and to do the same thing in python,
arrayName = map(range,[3] * 2)
print arrayName
# [ [0,1,2], [0,1,2] ] 

to test this, I made a basic version of the Minesweeper game in c4d since we can use 2D array to define the grid. 

here's an example :


done just for fun :)

No comments:

Post a Comment