rbwhitaker / realm-factory

The repository for Realm Factory, a lightweight level editor for XNA.
MIT License
6 stars 2 forks source link

[BUG] The flood fill algorithm is broken. #33

Open rbwhitaker opened 3 years ago

rbwhitaker commented 3 years ago

Describe the bug The flood fill algorithm used with the paint can only works on empty cells. It does not allow you to use it on contiguous areas of other items.

To Reproduce Steps to reproduce the behavior:

  1. Make a 3x3 grid.
  2. Fill the top-left 2x2 with a specific object type.
  3. Switch to the paint can.
  4. Pick a different object type.
  5. Click in the very top left corner.
  6. Only the top left element changes to the new type. I would have expected the full 2x2 section to change.

Expected behavior I would have expected the full 2x2 section to change.