Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ENHANCEMENT] Region Logic #711

Open
Chase-Grajeda opened this issue Jan 30, 2024 · 0 comments
Open

[ENHANCEMENT] Region Logic #711

Chase-Grajeda opened this issue Jan 30, 2024 · 0 comments
Assignees
Labels
enhancement Improvement to existing feature new feature Request for a new feature

Comments

@Chase-Grajeda
Copy link
Collaborator

Chase-Grajeda commented Jan 30, 2024

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.java in model/gameboard/
  • Write small child class of GridRegion called RippleEffectRegion in puzzle/rippleeffect/ to implement members
  • Write simple child class of GridCell called RippleEffectCell in puzzle/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

@Chase-Grajeda Chase-Grajeda added enhancement Improvement to existing feature new feature Request for a new feature labels Jan 30, 2024
@Kevin-771 Kevin-771 mentioned this issue Feb 2, 2024
10 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improvement to existing feature new feature Request for a new feature
Projects
None yet
Development

No branches or pull requests

5 participants