I'm working on a boggle type game for android, using libgdx. The user is presented with a 4x4 grid of letters and must find words by dragging their finger over the letters.
Unlike boggle I want used letters to disappear. Remaining letters will fall down (to the bottom of the board, screen orientation is fixed) and the board is refilled from the top. Users can rotate the board to try and put hard to use letters in a better place by strategic word selection.
d g a o u o r T h v R I d G n a
If i selected the word GRIT, those letters would disappear and the remaining fall down:
d u g a h o r o d v n a
and then get replaced by new letters
d w x y u g a z h o r o d v n a
I'm stuck figuring out how to represent the board and tiles.
I tried representing the board as a matrix to keep track of tiles selected and valid moves and the tiles stored in a matrix as well so that there was an easy mapping. This works, but I had to write some convoluted code to rotate the board.
How do other games handle this problem?
EDIT: So thinking about it, I should really just process my touch point according to the board rotation so cells stay constant. Attached an image of what I'm thinking.