"Brain buster" is a one player game in which an n x m grid of blocks are placed on the screen.
Initially each position on the grid contains a block, and each block is given one of five random colours.
Two blocks are adjacent if EITHER their row OR column location differs by 1. Two blocks form a group, if they are adjacent and have the same colour. A group of size k, consists of a group of size k-1, which is adjacent to a block with the same colour.
When the user selects a block, the largest group, to which that block belongs, is highlighted, and the corresponding number of points the user would gain is also showed. If the user confirms that choice, then the group is removed from the grid and the score is increased by k x (k-1), where k was the size of the group. If the user aborts their choice, then the corresponding group should cease to be highlighted.
Note that, when a group is removed, the blocks above will now occupy the "bottom most" position to fill the gaps created in their corresponding column. If a column becomes empty then all blocks to the right should move to the left to fill the gap created (while maintaining their relative positions to each other).
The game should terminate when the user chooses to quit or there are no more blocks on the screen.
Upon termination, the user's score should be displayed.
* All classes must be separated into .h and .cpp files
* The solution must use (programmer-defined) linked lists
Have anyone seen or done such a program before, input is needed.