Skip to content

queen-attack is missing tests (and example implementation) for the other diagonal#42

Merged
LegalizeAdulthood merged 2 commits intoexercism:masterfrom
siebenschlaefer:master
May 27, 2015
Merged

queen-attack is missing tests (and example implementation) for the other diagonal#42
LegalizeAdulthood merged 2 commits intoexercism:masterfrom
siebenschlaefer:master

Conversation

@siebenschlaefer
Copy link
Copy Markdown
Contributor

The unit tests and the example implementation test the north-west / south-east diagonal, but are missing the north-east / south-west diagonal.
Also there is no test case where the queens are not attacking each other.

@LegalizeAdulthood
Copy link
Copy Markdown
Contributor

Thanks for the additon!

I mimiced the JavaScript test cases; does the example JavaScript solution also suffer from the same problem?

@siebenschlaefer
Copy link
Copy Markdown
Contributor Author

@LegalizeAdulthood Yes it does. It only tests cases where xDistance === yDistance, but not cases where xDistance === -yDistance. I just added two test cases and amended the example implementation. It's in my repository.

LegalizeAdulthood added a commit that referenced this pull request May 27, 2015
queen-attack is missing tests (and example implementation) for the other diagonal
@LegalizeAdulthood LegalizeAdulthood merged commit 9b5d173 into exercism:master May 27, 2015
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