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

Add queen-attack #599

Merged
merged 1 commit into from
Oct 15, 2024
Merged

Add queen-attack #599

merged 1 commit into from
Oct 15, 2024

Conversation

BNAndras
Copy link
Member

No description provided.

group('Queen Attack', () {
group('Test creation of Queens with valid and invalid positions', () {
test('Queens with a valid position', () {
expect(() => Queen(2, 2), returnsNormally);
Copy link
Contributor

Choose a reason for hiding this comment

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

I haven't seen returnsNormally before. Nice.

Comment on lines +6 to +9
: assert(row >= 0, 'row not positive'),
assert(row <= 7, 'row not on board'),
assert(column >= 0, 'column not positive'),
assert(column <= 7, 'column not on board'),
Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, with the understanding that asserts are compiled out of production code.

@glennj glennj merged commit 86cd1a2 into exercism:main Oct 15, 2024
3 checks passed
@BNAndras BNAndras deleted the add-queen-attack branch October 15, 2024 23:05
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.

2 participants