Bejeweled Blitz - How does it assert there is always a move?

Posted by EvilTeach on Stack Overflow See other posts from Stack Overflow or by EvilTeach
Published on 2010-04-08T13:20:47Z Indexed on 2010/04/08 13:23 UTC
Read the original article Hit count: 320

Filed under:
|
|

I have been playing Bejeweled Blitz for a while now. Yes, it is an addiction. In thinking about the game, I have observed that on some boards, the bottom runs dry (no moves) leaving only the top part of the board playable. Frequently that part of the board drys up, and one is left with moves in area cleared by the last move.

The board never runs completely dry, so clearly the program is doing some sorts of calculation that allows it to choose what to drop to prevent it from running dry.

I have noticed in this 'mode' that it is very common for the algorithm to drop jewels which causes more non-dry area to appear in the horizontal area. Perhaps less frequent is a drop which seems designed to open up the bottom part of the board again.

So my question is "How would one go about designing an algorithm guarantee that there is always a move available.?"

© Stack Overflow or respective owner

Related posts about game-development

Related posts about Mobility