Skip to content

adds new board to game over screen#870

Open
LandonPatmore wants to merge 1 commit into
square:mainfrom
LandonPatmore:lpatmore/samples/dungeon-update
Open

adds new board to game over screen#870
LandonPatmore wants to merge 1 commit into
square:mainfrom
LandonPatmore:lpatmore/samples/dungeon-update

Conversation

@LandonPatmore
Copy link
Copy Markdown

closes #205

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Aug 30, 2022

CLA assistant check
All committers have signed the CLA.

@LandonPatmore LandonPatmore force-pushed the lpatmore/samples/dungeon-update branch from 5988e9d to 04a7460 Compare August 30, 2022 05:19
}

sealed class Output {
object NewBoard : Output()
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like this doesn't need to be a sealed class if we do the same thing any time any type of Output is emitted!

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went with this instead of just an object Output in the spirit of it being a sample that people can add to. I will foundations make the call here.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actively discourage this kind of things as a speculative YAGNI (you ain't gonna need it) violation. Definitely wouldn't want to see it in a sample.

I won't be able to give the PR a proper review until next week. In the meantime, thanks for the contribution!

cancelable = false,
onEvent = { context.actionSink.send(restartGame()) }
onEvent = {
if (it is ButtonClicked) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: I feel like if (it is ButtonClicked && it.button == NEUTRAL) { ... } else {...} would more closely replicate the original behavior

Copy link
Copy Markdown
Contributor

@steve-the-edwards steve-the-edwards left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM with the change of Output to an object NewBoard

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.

Add a "New Board" button to the Game Over dialog in the Dungeon Crawler sample.

5 participants