Пример #1
0
 public FillBoard(Game game, Saper saper)
 {
     this.createField = new CreateField(saper, game);
     this.game        = game;
     this.saper       = saper;
     Fill();
 }
Пример #2
0
 public ReadBoard(Game game, Saper saper, List <Field> fieldList)
 {
     this.createField = new CreateField(saper, game);
     this.game        = game;
     this.saper       = saper;
     this.fieldList   = fieldList;
     Read();
 }
Пример #3
0
        public void Remove(Game game, Saper saper)
        {
            if (game.Board.GameBoard.Btn_grid != null)
            {
                for (int x = 0; x < game.Board.GameBoard.Btn_grid.GetLength(0); x++)
                {
                    for (int y = 0; y < game.Board.GameBoard.Btn_grid.GetLength(1); y++)
                    {
                        if (saper.Controls.Contains(game.Board.GameBoard.Btn_grid[x, y]))
                        {
                            saper.Controls.Remove(game.Board.GameBoard.Btn_grid[x, y]);
                        }

                        if (saper.Controls.Contains(game.Board.GameBoard.Lbl_grid[x, y]))
                        {
                            saper.Controls.Remove(game.Board.GameBoard.Lbl_grid[x, y]);
                        }
                    }
                }
            }
        }
Пример #4
0
 public CleanGame(Game game, Saper saper)
 {
     Remove(game, saper);
 }
Пример #5
0
 public CreateField(Saper saper, Game game)
 {
     this.saper = saper;
     this.game  = game;
 }