All,
I am going to write a clone of an Android game called
Bubble Blast 2 in
Scratch. The game board is initialized on a 5x6 grid. Each point on the grid, there can be one of 5 possible states:
- No bubble
- 1-hit bubble
- 2-hit bubble
- 3-hit bubble
- 4-hit bubble
You are also given a certain number of hits/touches to clear the board. When a bubble has no more hits, it explodes and sends shrapnel at 0, 90, 180 and 270 degrees on Cartesian coordinate system. When shrapnel hits another bubble its trajectory is stopped but the hit count of the bubble it collided with is reduced by 1 and if that bubble reaches 0 it in turn explodes creating a chain reaction.
I want to be able to generate puzzles of increasing difficulty but can't seem to land on an algorithm that feels right. I think it ends up being some relationship between:
- Minimum number of hits by a human to clear the board
- Number of ways to clear the board using the minimum number of hits
- Number of hits given to the human
- Number of ways to clear the board using any/all of the available hits
Perhaps it may be better to reduce the number of ways to lose rather than maximize the number of ways to win. Imagine a board with a single 1-hit bubble. There is only 1 way to win but 0 ways to lose.
Your challenge, should you choose to accept it is to create an algorithm that can generate a user defined number of boards that span the spectrum of difficulty (easiest being there is no way to lose and hardest being there is only 1 way to win and it requires all of your available hits). I believe that the maximum number of available hits I have ever seen a game board initialized with is 7 or 8 which should greatly reduce the number of possible game boards.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.