Exemplo n.º 1
0
        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];
            }
        }
Exemplo n.º 2
0
        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();
                }
            }
        }