示例#1
0
 def to_matrix(self):
     from minesweeper.grids.matrices import MineMatrix
     matrix = MineMatrix(self.height, self.width)
     for entry in self.map_data:
         # Each entry is a mine that needs to be placed in the empty matrix
         matrix.place_mine(entry.row_num, entry.col_num)
     return matrix