refactor: reorganize component structure and improve entity tagging#12
refactor: reorganize component structure and improve entity tagging#12
Conversation
thnhmai06
commented
Oct 9, 2025
- Added new classes for Ball, BrickDrop, BrickExplode, and BrickHealth to enhance gameplay mechanics (introducing new behaviors and properties).
- Updated .gitignore to include additional files and directories for better project management.
- Adjusted BrickFactory to streamline brick creation process.
- Added new classes for Ball, BrickDrop, BrickExplode, and BrickHealth to enhance gameplay mechanics (introducing new behaviors and properties). - Updated .gitignore to include additional files and directories for better project management. - Adjusted BrickFactory to streamline brick creation process.
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the component structure and improves entity tagging by introducing a comprehensive tag system and reorganizing package structure. The changes streamline the architecture by replacing complex component wrappers with direct tagging interfaces and establishing clearer component categorization.
Key changes include:
- Introduction of a hierarchical tag system with sealed interfaces for type safety
- Replacement of the
Brickwrapper component with directBrickHealthattachment - Migration from abstract classes to interface-based component classification
Reviewed Changes
Copilot reviewed 33 out of 35 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
src/main/java/com/github/codestorm/bounceverse/tags/Optional.java |
Removed old optional tag interface |
src/main/java/com/github/codestorm/bounceverse/tags/ForBrick.java |
Removed old brick-specific tag interface |
src/main/java/com/github/codestorm/bounceverse/factory/BrickFactory.java |
Updated imports and simplified brick creation by removing wrapper component |
src/main/java/com/github/codestorm/bounceverse/data/types/Side.java |
Enhanced documentation with proper JavaDoc formatting |
src/main/java/com/github/codestorm/bounceverse/data/types/EntityType.java |
Added new enum defining entity types for the game |
src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/RequiredTag.java |
New tag interface for required components |
src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/OptionalTag.java |
New tag interface for optional components |
src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPowerUp.java |
New entity-specific tag for power-up components |
src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForPaddle.java |
New entity-specific tag for paddle components |
src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBrick.java |
New entity-specific tag for brick components |
src/main/java/com/github/codestorm/bounceverse/data/tags/entities/ForBall.java |
New entity-specific tag for ball components |
src/main/java/com/github/codestorm/bounceverse/data/tags/components/PropertyComponent.java |
Converted from abstract class to interface |
src/main/java/com/github/codestorm/bounceverse/data/tags/components/BehaviorComponent.java |
Converted from abstract class to interface |
src/main/java/com/github/codestorm/bounceverse/data/tags/Tag.java |
Root sealed interface for the tag hierarchy |
src/main/java/com/github/codestorm/bounceverse/data/tags/RequirementTag.java |
Base interface for requirement-related tags |
src/main/java/com/github/codestorm/bounceverse/data/tags/EntityTag.java |
Base interface for entity-related tags |
src/main/java/com/github/codestorm/bounceverse/data/tags/ComponentTag.java |
Base interface for component-related tags |
src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickShield.java |
Updated package and tag usage |
src/main/java/com/github/codestorm/bounceverse/components/properties/brick/BrickHealth.java |
Added CoreComponent annotation and updated tags |
src/main/java/com/github/codestorm/bounceverse/components/properties/Shield.java |
Converted to extend Component directly |
src/main/java/com/github/codestorm/bounceverse/components/properties/Health.java |
Converted to extend Component directly |
src/main/java/com/github/codestorm/bounceverse/components/brick/Brick.java |
Removed brick wrapper component |
src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java |
Updated to use entity type checking instead of component checking |
src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickDrop.java |
Updated package and tag usage |
Multiple _old package files |
Moved legacy components to _old package structure |
src/main/java/com/github/codestorm/bounceverse/Bounceverse.java |
Added comprehensive class documentation and fixed brick positioning |
settings.gradle |
Updated project name capitalization |
Files not reviewed (1)
- .idea/misc.xml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/main/java/com/github/codestorm/bounceverse/data/tags/requirements/OptionalTag.java
Outdated
Show resolved
Hide resolved
src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickExplode.java
Show resolved
Hide resolved
Added EntityType.BRICK to the newBrick method for better entity classification. Updated documentation for OptionalTag to correct a typo.
There was a problem hiding this comment.
Pull Request Overview
Copilot reviewed 33 out of 35 changed files in this pull request and generated 1 comment.
Files not reviewed (1)
- .idea/misc.xml: Language not supported
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
src/main/java/com/github/codestorm/bounceverse/components/behaviors/brick/BrickDrop.java
Show resolved
Hide resolved
) * refactor: reorganize component structure and improve entity tagging - Added new classes for Ball, BrickDrop, BrickExplode, and BrickHealth to enhance gameplay mechanics (introducing new behaviors and properties). - Updated .gitignore to include additional files and directories for better project management. - Adjusted BrickFactory to streamline brick creation process. * refactor: enhance BrickFactory to include entity type for bricks Added EntityType.BRICK to the newBrick method for better entity classification. Updated documentation for OptionalTag to correct a typo.