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

Dnd character #169

Merged
merged 5 commits into from
Dec 27, 2023
Merged

Dnd character #169

merged 5 commits into from
Dec 27, 2023

Conversation

glennj
Copy link
Contributor

@glennj glennj commented Dec 22, 2023

Fixes #168

@BNAndras
Copy link
Member

Test suite shouldn't show how to calculate hitpoints. That was a lack of my imagination at the time. Instead we should check if it falls in a range between 6 and 14.

@BNAndras
Copy link
Member

Otherwise, it looks good to me.

@BNAndras BNAndras added x:rep/small Small amount of reputation x:module/practice-exercise Work on Practice Exercises x:action/fix Fix an issue x:action/sync Sync content with its latest version labels Dec 22, 2023
@BNAndras
Copy link
Member

Looking at this closer now that I'm off work, but I'd suggest adding a comment that indicates the ... needs to be replaced to pass the tests. That's what I did with clock.

@BNAndras
Copy link
Member

BNAndras commented Dec 26, 2023

Comment looks good. I was unsure about the indentation since re-indenting with CPO resulted in this:

data Character:
  | blank-character()
    with:
    method randomize-stats(self) -> Character

However, it looks like it's indenting the method line relative to | blank-character() line, not the one immediately before it.

data Character:
  | blank-character()
		  with:
        method randomize-stats(self) -> Character:

becomes

data Character:
  | blank-character()
		  with:
    method randomize-stats(self) -> Character:

There's no difference in behavior when with: and method are aligned with one another or not. The Pyret style guide also doesn't address this. Personally, I'd prefer your indenting relative to the with: since it flows better. I think the additional clarity is worth the very minor discrepancy with CPO.

@BNAndras BNAndras merged commit 60d80bf into exercism:main Dec 27, 2023
2 checks passed
@glennj
Copy link
Contributor Author

glennj commented Dec 27, 2023

Test suite shouldn't show how to calculate hitpoints.

I think it's fine as-is: plenty of other tracks do exactly this.

There's no difference in behavior when with: and method are aligned with one another or not. The Pyret style guide also doesn't address this. Personally, I'd prefer your indenting relative to the with: since it flows better. I think the additional clarity is worth the very minor discrepancy with CPO

I used similar indenting to sharing:, with the method indented one level, except the whole with: block indented to be "under" the particular variant.

@glennj glennj deleted the dnd-character branch December 27, 2023 19:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
x:action/fix Fix an issue x:action/sync Sync content with its latest version x:module/practice-exercise Work on Practice Exercises x:rep/small Small amount of reputation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dnd-character stub is actually the example solution
2 participants