Beispiel #1
0
 private void InitGrid()
 {
     for (int i = 0; i < 5; i++)
     {
         for (int j = 0; j < 5; j++)
         {
             grid[i, j] = new GridPosition(position.X + Block.WIDTH * i,
                 position.Y + Block.HEIGHT * j);
         }
     }
 }
Beispiel #2
0
 private void InitGrid()
 {
     double x = leftBound.Right + Block.WIDTH / 2;
     for (int i = 0; i < 18; i++)
     {
         double y = upperBound.Bottom - Block.HEIGHT / 2;
         for (int j = 0; j < 22; j++)
         {
             grid[i, j] = new GridPosition(x, y);
             y -= Block.HEIGHT;
         }
         x += Block.HEIGHT;
     }
 }