Skip to content

Conversation

@botwhytho
Copy link

Fixing bug where die can continue being rolled even if it's a player's turn to move (and hence die element shouldn't respond to double clicks temporarily).

…s turn to move (and hence die element shouldn't respond to double clicks temporarily).
@onierstrasz
Copy link
Contributor

In the proposed solution, there is a lot of logic added to GtLudoGameElement>>#initializeFor:. A cleaner solution would be to have the GtLudoDieElement hold a reference to the game instead of the die (or instead of just the die), and then ask the game to roll the die. The game will then know if the die can be rolled. This would also require the initialization of the DieELement to be changed in GtLudoBoardElement>>#addDieElement. In this way we would keep game logic out of the UI elements.

@onierstrasz onierstrasz self-requested a review January 9, 2025 09:10
@svenvc
Copy link
Contributor

svenvc commented Jan 9, 2025

Please leave this PR open and do not remove/delete it nor its origin.
I am using this as an example to review a PR inside GT.
Thx.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants