示例#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;
 }