The good-old game of minesweeper with a twist, all mines are swapped with geese. Programmed in C++, the code implements recursive and bitwise operations to achieve an efficient way around keeping track of pieces type (hidden/shown, geese/no-geese, marked/no-mark).
Instead of categorizing each game-block as its own Object, this program assigns each block with a byte and using a one-dimension array we can keep track of each piece, locate it easily and determine its type. And of course since we are assigning each block a byte, we can make use of bitwise operations to change the state of each piece.
Leave A Comment