public void ConvertMap() { int totalCount = Height * Width; MineItems2 = new MineItem[totalCount]; for (int i = 0; i < totalCount; i++) { MineItems2[i] = MineItems[i / Height, i % Width]; } }
public MineMap(int width, int height) { Width = width; Height = height; MineItems = new MineItem[Width, Height]; for (int i = 0; i < Height; i++) { for (int j = 0; j < Width; j++) { MineItems[i, j] = new MineItem(); } } }