Me and Joe had a new idea for representing the pixelated board. The board
could be represented by blobs. Each blob has a color, size, and list of
neighbor blobs. With a reference to the main blob, we can completely forget
about the board of pixels and simply do operations using the blobs. To change
the color, we go through the list of the main blob's neighbors and check which
ones have that color. We then merge each of those blobs with the main blob by
combining the sizes and neighbor lists. This operation should be much faster
than our current flood fill method.
One issue with this idea is that our current brute force algorithm makes many
copies of the grid to try different color-change operations on it. I don't
know of a way that the blobs could be efficiently copied. We would have to
develop a way to represent the blobs in a way that they could be efficiently
copied, or change the brute force algorithm.
Original issue reported on code.google.com by smd7...@gmail.com on 20 Mar 2011 at 2:05
Original issue reported on code.google.com by
smd7...@gmail.com
on 20 Mar 2011 at 2:05