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

Adding approach to Queen-Attack #2860

Merged
merged 20 commits into from
Nov 24, 2024

Conversation

jagdish-15
Copy link
Contributor

pull request

This pull request adds an approach to the Queen-Attack exercise.

I was unsure how to generate a uuid for the approach, so I've left it empty for now. I would greatly appreciate guidance on how to generate one.


Reviewer Resources:

Track Policies

@tasxatzial
Copy link
Member

@jagdish-15
Copy link
Contributor Author

@tasxatzial, thank you so much for letting me know! I couldn't find it anywhere—I guess I didn't search thoroughly enough in the documentation. But I've now configured the configlet and will be adding the UUID as soon as possible!

@tasxatzial
Copy link
Member

Just by looking at the general structure of the files, it's probably a good idea to format them with one sentence per line. The maintainer will likely ask for it, see here

@jagdish-15
Copy link
Contributor Author

@tasxatzial, I've formatted the document as you requested. Thank you for the suggestions! Please let me know if there's anything else I should consider.

@tasxatzial
Copy link
Member

@jagdish-15 Well, I can do a quick review of the general style (not the code), but I'd prefer to get permission from the maintainer first. Keep in mind that any changes I propose can be overridden by the maintainer, so I'll need to be extra careful with my suggestions to minimize your workload.

@kahgoh let me know if you need any help with this one.

@jagdish-15
Copy link
Contributor Author

Thanks, @tasxatzial! I appreciate your offer to review the style. I understand that any changes might be overridden by the maintainer, so I’ll leave it to you to proceed carefully.

@kahgoh, please let me know if you have any other feedback or if you'd like me to make any changes.

@jagdish-15
Copy link
Contributor Author

Hello @kahgoh,

I've updated this to align with all the consistency suggestions you provided for the previous PR here. Please take a look and let me know if there's anything else you'd like me to adjust.

@kahgoh
Copy link
Member

kahgoh commented Nov 19, 2024

Thanks @jagdish-15, I've just gotten around to taking a look and posting the comments. Also thanks @tasxatzial for reviewing the style!

@kahgoh kahgoh changed the title Adding approache to Queen-Attack Adding approach to Queen-Attack Nov 19, 2024
@jagdish-15
Copy link
Contributor Author

Hello @kahgoh,

I've renamed the approach to the one you suggested, as it better aligns with the content and the overall approach (thank you for that!). Additionally, I've streamlined the content file by removing several unnecessary sections and making alterations to others. Could you take a look at the changes and let me know what you think?

Copy link
Member

@kahgoh kahgoh left a comment

Choose a reason for hiding this comment

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

Thanks! A couple of minor style comments.


## Explanation

1. **Constructor**:
Copy link
Member

Choose a reason for hiding this comment

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

Is meant to be a sub-heading (###)? If so could you also fix move remove the indenting of the text in the section?

Suggested change
1. **Constructor**:
### Constructor


If either of these conditions is true, an exception is thrown.

2. **Method (`canQueensAttackOneAnother`)**:
Copy link
Member

Choose a reason for hiding this comment

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

Similar to above, I think this is a heading? Also suggest rearranging the name to try make it read better.

Suggested change
2. **Method (`canQueensAttackOneAnother`)**:
### `canQueensAttackOneAnother` Method

Copy link
Member

@tasxatzial tasxatzial left a comment

Choose a reason for hiding this comment

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

I had a review pending, but most of the suggestions have been covered. One last thing i'd like to point out is that there are lots of ifs that are redundant since it's clear that the sentence describes a condition. I'll leave them as suggestions.

@jagdish-15 don't act on them without permission from the maintainer.

Comment on lines 33 to 34
- If either queen is `null`.
- If both queens occupy the same position.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- If either queen is `null`.
- If both queens occupy the same position.
- Either queen is `null`.
- Both queens occupy the same position.

Comment on lines 42 to 44
- If the row difference is zero (the queens are on the same row).
- If the column difference is zero (the queens are on the same column).
- If the row and column differences are equal (the queens are on the same diagonal).
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
- If the row difference is zero (the queens are on the same row).
- If the column difference is zero (the queens are on the same column).
- If the row and column differences are equal (the queens are on the same diagonal).
- The row difference is zero (the queens are on the same row).
- The column difference is zero (the queens are on the same column).
- The row and column differences are equal (the queens are on the same diagonal).

Comment on lines 11 to 13
1. **Same Row**: If the queens are on the same row.
2. **Same Column**: If the queens are on the same column.
3. **Same Diagonal**: If the queens are on the same diagonal, i.e., the absolute difference between their row and column positions is equal.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
1. **Same Row**: If the queens are on the same row.
2. **Same Column**: If the queens are on the same column.
3. **Same Diagonal**: If the queens are on the same diagonal, i.e., the absolute difference between their row and column positions is equal.
1. **Same Row**: The queens are on the same row.
2. **Same Column**: The queens are on the same column.
3. **Same Diagonal**: The queens are on the same diagonal, i.e., the absolute difference between their row and column positions is equal.

@kahgoh
Copy link
Member

kahgoh commented Nov 22, 2024

I had a review pending, but most of the suggestions have been covered. One last thing i'd like to point out is that there are lots of ifs that are redundant since it's clear that the sentence describes a condition. I'll leave them as suggestions.

@jagdish-15 don't act on them without permission from the maintainer.

The suggestions look fine to me.

@jagdish-15
Copy link
Contributor Author

Thank you so much, @tasxatzial and @kahgoh, for your valuable feedback! I truly appreciate it and have updated the content based on all your suggestions. Apologies for the delay in getting back to you!

Copy link
Member

@kahgoh kahgoh left a comment

Choose a reason for hiding this comment

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

Looks good now! Thanks!

@kahgoh kahgoh merged commit 5e5d444 into exercism:main Nov 24, 2024
2 checks passed
@jagdish-15 jagdish-15 deleted the add-approach-queen-attack branch November 26, 2024 17:41
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