LEGUP
LEGUP copied to clipboard
[ENHANCEMENT] Region Logic
LEGUP currently lacks a generalized way to track regions and display them on game boards. This feature aims to start tracking cells as indiviudal regions of cells, which will allow us to implement region-based logic in puzzles such as Ripple Effect, Minesweeper, and Star Battle
GridRegion.java spec:
(Members)
- List / Array of pointers to GridCells
- The list of GridCells allows us to quickly dereference the current board state and observe the current values of a region. Using pointers allows a memory efficient solution in the case of overlapping cells between regions. Assert this region is updated with each board transition
- String Name
- Name of region
XML Serialization Example:
<board>
<region name='name'>
<cells>
<cell value='value1' x='0' y='0'/>
<cell value='value2' x='1' y='0'/>
</cells>
</region>
</board>
Describe the improvement you'd like
- Create red colored tiles with low opacity for testing
- Create an abstract region class called
GridRegion.javainmodel/gameboard/ - Write small child class of
GridRegioncalledRippleEffectRegioninpuzzle/rippleeffect/to implement members - Write simple child class of
GridCellcalledRippleEffectCellinpuzzle/rippleeffect/ - Write custom XML serialization of Ripple Effect similar to other puzzles
- Successfully load demo XML file
- Successfully save demo XML file
- Successfully edit demo XML file
Describe alternatives you've considered
No response
Additional Context
No response