WIP: Draft: PopUp updates #207

Closed
40457809 wants to merge 3 commits from owen/popUpPropagation into dev
40457809 commented 2026-03-05 08:15:54 +00:00 (Migrated from gitlab.eeecs.qub.ac.uk)

This is just a proposal, don't kill me.

The current way popUps work is that gameBoardController initializes the PopUpHelper static class, and then squares call the makepopup method. This technically works but is a bit hacky.

I noticed that all popups are created in onPass and onLand, and that at maximum only one popup is created per method call.

This merge alters GameSquare's onPass and onLand method signatures to return a PopUp (wrapped in a java.util.Optional class). GameSystem.resolveTurn() collects these and passes them along to the UI. Also, the resolveTurn and resolvePasses functions are merged because they are always called one after another.

Again, this is just a proposal.

Also this changes some logic and breaks 3 grillion tests.

This is just a proposal, don't kill me. The current way popUps work is that `gameBoardController` initializes the `PopUpHelper` static class, and then squares call the `makepopup` method. This technically works but is a bit hacky. I noticed that all popups are created in `onPass` and `onLand`, and that at maximum only one popup is created per method call. This merge alters `GameSquare`'s `onPass` and `onLand` method signatures to return a `PopUp` (wrapped in a `java.util.Optional` class). `GameSystem.resolveTurn()` collects these and passes them along to the UI. Also, the `resolveTurn` and `resolvePasses` functions are merged because they are always called one after another. Again, this is just a proposal. Also this changes some logic and breaks 3 grillion tests.
40457809 commented 2026-03-05 08:15:54 +00:00 (Migrated from gitlab.eeecs.qub.ac.uk)

assigned to @40457809

assigned to @40457809
40457809 commented 2026-03-05 08:17:02 +00:00 (Migrated from gitlab.eeecs.qub.ac.uk)

changed the description

changed the description
40457809 commented 2026-03-05 08:18:08 +00:00 (Migrated from gitlab.eeecs.qub.ac.uk)

added 1 commit

  • f470f04d - Update resolveTurn to call onPass before onLand

Compare with previous version

added 1 commit <ul><li>f470f04d - Update resolveTurn to call onPass before onLand</li></ul> [Compare with previous version](/CSC2058-2526/CSC2058-2526-G46/-/merge_requests/147/diffs?diff_id=19493&start_sha=4c25a83b5f626fb6b59137e8382b52a6e352cf59)
40457809 (Migrated from gitlab.eeecs.qub.ac.uk) closed this pull request 2026-03-10 20:43:11 +00:00

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
owenryan/carbonopoly!207
No description provided.