DO NOT MERGE: Quickly hack up the 'count of unique 4-connected islands' solution #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Instead of playing JezzBall, this build provides a solution for finding the count of 4-connected islands in the playfield.
Each playfield byte can initially be 0 (WATER) or 1 (LAND).
The game launches directly to the playfield and doesn't contain balls or player sprites. Press A to solve the playfield.
CLEAR% in the HUD will display the count of islands found.
Each discovered island will be marked with a unique number (>1).
This works by walking over every playfield tile, skipping water tiles and already-discovered land tiles, and upon finding an undiscovered land tile, walking the entire island connected to that origin land tile and marking the island by setting the tiles comprising it with a unique number (>1).