Ejemplo n.º 1
0
        //click paintBoard
        private void paintBoard_OnClickGrid(object sender, PaintBoard.PaintBoard.ClickEventArgs e)
        {
            int x = e.Col;
            int y = e.Row;
            Grid currentGrid = level.GetGrid(y, x);
            if (currentGrid == null)
            {
                currentGrid = new Grid(y, x);
                level.grids.Add(currentGrid);
            }

            if (deleteClick)
            {
                level.DeleteGrid(y, x);
            }
            else
            {
                currentGrid.GridState = type;
                level.SetGrid(y, x, currentGrid);
            }

            //Console.WriteLine(currentGrid.GridState);
        }
Ejemplo n.º 2
0
 //reset grid's info
 public void SetGrid(int row, int col, Grid grid)
 {
     DeleteGrid(row, col);
     grids.Add(grid);
 }