예제 #1
0
        public void UncoverTile(int Cover1, int Cover2, int Uncover1, int Uncover2, int Horizontal, int Vertical, Tile[,] Minefield, Game game)
        {
            game.UncoveredTilesCounter();
            Uncovered = true;
            Flag      = false;
            if (NormalColour == Cover1)
            {
                NormalColour = Uncover1;
            }
            else if (NormalColour == Cover2)
            {
                NormalColour = Uncover2;
            }
            else
            {
            }

            if (MinesAround == 0)
            {
                foreach (Tile tile in TilesAround)
                {
                    if (tile.Uncovered == false)
                    {
                        tile.UncoverTile(Cover1, Cover2, Uncover1, Uncover2, tile.HorizontalPos, tile.VerticalPos, Minefield, game);
                    }
                }
            }
            else
            {
                Sign = (MinesAround.ToString() + " ");
            }
            Game.RecolourTile(NormalColour, Horizontal, Vertical, Minefield);
        }