Company: Autodesk_11april
Difficulty: medium
Bubble Popping Game Problem Description Let's define the diagonal neighbors of a given cell as the surrounding cells, with precisely one corner touching a corner of the given cell. For example, for a cell at (r, c) , its diagonal neighbors would be (r-1, c-1) , (r-1, c+1) , (r+1, c-1) , and (r+1, c+1) , provided they are within the board boundaries. Given a board of cells containing a bubble of a specific color, your task is to emulate a bubble-popping game. In this game, the player can click a cell every turn to pop bubbles. After clicking the cell, the following happens: The bubble in the clicked cell and bubbles of the same color among its diagonal neighbors are "popped" and removed, resulting in empty cells. After bubbles are removed, the remaining bubbles in cells above the empty cells drop down to fill all empty cells. Nothing happens if the clicked cell is empty (it does not contain a bubble). The input consists of two arrays: An initial board of cells bubbles - a multidimension