{"action":"created","comment":{"url":"https://api.github.com/repos/exercism/x-common/pulls/comments/57541642","id":57541642,"diff_hunk":"@@ -0,0 +1,111 @@\n+{\n+  \"#\": [\n+    \"Testing invalid positions will vary by language. The expected\",\n+    \"value of -1 is there to indicate some sort of failure should\",\n+    \"occur.\",\n+    \"Some languages implement tests beyond this set, such as checking\",\n+    \"for two pieces being placed on the same position, representing\",\n+    \"the board graphically, or using standard chess notation. Those\",\n+    \"tests can be offered as extra credit\"\n+  ],\n+  \"cases\": [\n+    {\n+      \"description\": \"can not attack\",\n+      \"white_queen\": {\n+        \"position\": \"(2,4)\"\n+      },\n+      \"black_queen\": {\n+        \"position\": \"(6,6)\"\n+      },\n+      \"expected\": false\n+    },\n+    {\n+      \"description\": \"can attack on same rank\",\n+      \"white_queen\": {\n+        \"position\": \"(2,4)\"\n+      },\n+      \"black_queen\": {\n+        \"position\": \"(2,6)\"\n+      },\n+      \"expected\": true\n+    },\n+    {\n+      \"description\": \"can attack on same file\",\n+      \"white_queen\": {\n+        \"position\": \"(4,5)\"\n+      },\n+      \"black_queen\": {\n+        \"position\": \"(2,5)\"\n+      },\n+      \"expected\": false\n+    },\n+    {\n+      \"description\": \"can attack on first diagonal\",\n+      \"white_queen\": {\n+        \"position\": \"(2,2)\"\n+      },\n+      \"black_queen\": {\n+        \"position\": \"(0,4)\"\n+      },\n+      \"expected\": false\n+    },\n+    {\n+      \"description\": \"can attack on second diagonal\",\n+      \"white_queen\": {\n+        \"position\": \"(2,2)\"\n+      },\n+      \"black_queen\": {\n+        \"position\": \"(3,1)\"\n+      },\n+      \"expected\": false","path":"queen-attack.json","position":60,"original_position":60,"commit_id":"ed35c0fdcdd59da5e3356a1682abd39f6ca59414","original_commit_id":"ed35c0fdcdd59da5e3356a1682abd39f6ca59414","user":{"login":"petertseng","id":346181,"avatar_url":"https://avatars.githubusercontent.com/u/346181?v=3","gravatar_id":"","url":"https://api.github.com/users/petertseng","html_url":"https://github.com/petertseng","followers_url":"https://api.github.com/users/petertseng/followers","following_url":"https://api.github.com/users/petertseng/following{/other_user}","gists_url":"https://api.github.com/users/petertseng/gists{/gist_id}","starred_url":"https://api.github.com/users/petertseng/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/petertseng/subscriptions","organizations_url":"https://api.github.com/users/petertseng/orgs","repos_url":"https://api.github.com/users/petertseng/repos","events_url":"https://api.github.com/users/petertseng/events{/privacy}","received_events_url":"https://api.github.com/users/petertseng/received_events","type":"User","site_admin":false},"body":"since coordinates both sum to 4, should this be true?","created_at":"2016-03-28T03:11:11Z","updated_at":"2016-03-28T03:11:11Z","html_url":"https://github.com/exercism/x-common/pull/211#discussion_r57541642","pull_request_url":"https://api.github.com/repos/exercism/x-common/pulls/211","_links":{"self":{"href":"https://api.github.com/repos/exercism/x-common/pulls/comments/57541642"},"html":{"href":"https://github.com/exercism/x-common/pull/211#discussion_r57541642"},"pull_request":{"href":"https://api.github.com/repos/exercism/x-common/pulls/211"}}},"pull_request":{"url":"https://api.github.com/repos/exercism/x-common/pulls/211","id":64269103,"html_url":"https://github.com/exercism/x-common/pull/211","diff_url":"https://github.com/exercism/x-common/pull/211.diff","patch_url":"https://github.com/exercism/x-common/pull/211.patch","issue_url":"https://api.github.com/repos/exercism/x-common/issues/211","number":211,"state":"closed","locked":false,"title":"Add standard tests for Queen Attack","user":{"login":"IanWhitney","id":12144,"avatar_url":"https://avatars.githubusercontent.com/u/12144?v=3","gravatar_id":"","url":"https://api.github.com/users/IanWhitney","html_url":"https://github.com/IanWhitney","followers_url":"https://api.github.com/users/IanWhitney/followers","following_url":"https://api.github.com/users/IanWhitney/following{/other_user}","gists_url":"https://api.github.com/users/IanWhitney/gists{/gist_id}","starred_url":"https://api.github.com/users/IanWhitney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IanWhitney/subscriptions","organizations_url":"https://api.github.com/users/IanWhitney/orgs","repos_url":"https://api.github.com/users/IanWhitney/repos","events_url":"https://api.github.com/users/IanWhitney/events{/privacy}","received_events_url":"https://api.github.com/users/IanWhitney/received_events","type":"User","site_admin":false},"body":"https://github.com/exercism/todo/issues/133\r\n\r\nWhile implementing Queen Attack for Rust\r\n(https://github.com/exercism/xrust/pull/89), I surveyed all current\r\nimplementations of this exercise and documented which tests they used.\r\nThat full list of tests is here:\r\nhttps://gist.github.com/IanWhitney/dd34f8a16c730f3cd77c\r\n\r\nIn order of prevalence, the five most common test types cover:\r\n\r\n1. Can 2 queens attack each other?\r\n2. [Can 2 pieces occupy the same\r\nspace](https://github.com/exercism/xelixir/blob/0965c4e107de68979a493b82f9f0859773fcb83b/exercises/queen-attack/queen_attack_test.exs#L26)?\r\n3. [Comparing string representations of the\r\nchessboard](https://github.com/exercism/xelixir/blob/0965c4e107de68979a493b82f9f0859773fcb83b/exercises/queen-attack/queen_attack_test.exs#L33)\r\n4. [Does a chessboard start with the queens in their default\r\npositions?](https://github.com/exercism/xelixir/blob/0965c4e107de68979a493b82f9f0859773fcb83b/exercises/queen-attack/queen_attack_test.exs#L12)\r\n5. [Errors are raised if an invalid position is\r\nused](https://github.com/exercism/xpython/blob/b9dfe291845a31301029d947b3cf3a2ffc85b0b6/exercises/queen-attack/queen_attack_test.py#L55)\r\n\r\nThen there are some uncommon edge-case tests. Can there be more than one\r\nchessboard? Can the board be empty? Algebraic chess notation? Etc.\r\n\r\nOf the top five, I found that only numbers 1 and 5 really cover the\r\nexercise as stated -- if I place two queens on the board, can they\r\nattack each other?\r\n\r\nSo, those are the tests that I've documented in this json file.\r\n\r\nImplementing the other tests requires the introduction of a Chessboard\r\nobject, and also a way to identify pieces (which team they belong to,\r\nhow they are represented as strings, etc.)  That can be interesting to\r\ndo, but I find it beyond the scope of this exercise as written.\r\n\r\nAt best, I think these tests should be suggested as Extra Credit.\r\n\r\nTest order also varied between implementations.\r\n\r\nI have found that the faster I can get the first test to pass, the\r\nbetter. So my first test requires nothing more than a `can_attack`\r\nfunction that returns false. The tests then build on that, adding\r\ncomplexity. Then, once `can_attack` is fully implemented, I add the\r\ncurveball test of invalid chess positions, which will get students\r\nthinking about bad inputs and error handling.","created_at":"2016-03-27T16:17:01Z","updated_at":"2016-03-28T03:11:11Z","closed_at":"2016-03-27T22:35:37Z","merged_at":"2016-03-27T22:35:37Z","merge_commit_sha":"78004f0e6f08756ce6dceccc726e4aca2dd25f89","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/exercism/x-common/pulls/211/commits","review_comments_url":"https://api.github.com/repos/exercism/x-common/pulls/211/comments","review_comment_url":"https://api.github.com/repos/exercism/x-common/pulls/comments{/number}","comments_url":"https://api.github.com/repos/exercism/x-common/issues/211/comments","statuses_url":"https://api.github.com/repos/exercism/x-common/statuses/ed35c0fdcdd59da5e3356a1682abd39f6ca59414","head":{"label":"IanWhitney:define_queen_attack","ref":"define_queen_attack","sha":"ed35c0fdcdd59da5e3356a1682abd39f6ca59414","user":{"login":"IanWhitney","id":12144,"avatar_url":"https://avatars.githubusercontent.com/u/12144?v=3","gravatar_id":"","url":"https://api.github.com/users/IanWhitney","html_url":"https://github.com/IanWhitney","followers_url":"https://api.github.com/users/IanWhitney/followers","following_url":"https://api.github.com/users/IanWhitney/following{/other_user}","gists_url":"https://api.github.com/users/IanWhitney/gists{/gist_id}","starred_url":"https://api.github.com/users/IanWhitney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IanWhitney/subscriptions","organizations_url":"https://api.github.com/users/IanWhitney/orgs","repos_url":"https://api.github.com/users/IanWhitney/repos","events_url":"https://api.github.com/users/IanWhitney/events{/privacy}","received_events_url":"https://api.github.com/users/IanWhitney/received_events","type":"User","site_admin":false},"repo":{"id":54829018,"name":"x-common","full_name":"IanWhitney/x-common","owner":{"login":"IanWhitney","id":12144,"avatar_url":"https://avatars.githubusercontent.com/u/12144?v=3","gravatar_id":"","url":"https://api.github.com/users/IanWhitney","html_url":"https://github.com/IanWhitney","followers_url":"https://api.github.com/users/IanWhitney/followers","following_url":"https://api.github.com/users/IanWhitney/following{/other_user}","gists_url":"https://api.github.com/users/IanWhitney/gists{/gist_id}","starred_url":"https://api.github.com/users/IanWhitney/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IanWhitney/subscriptions","organizations_url":"https://api.github.com/users/IanWhitney/orgs","repos_url":"https://api.github.com/users/IanWhitney/repos","events_url":"https://api.github.com/users/IanWhitney/events{/privacy}","received_events_url":"https://api.github.com/users/IanWhitney/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/IanWhitney/x-common","description":"Shared metadata for exercism exercises.","fork":true,"url":"https://api.github.com/repos/IanWhitney/x-common","forks_url":"https://api.github.com/repos/IanWhitney/x-common/forks","keys_url":"https://api.github.com/repos/IanWhitney/x-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IanWhitney/x-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IanWhitney/x-common/teams","hooks_url":"https://api.github.com/repos/IanWhitney/x-common/hooks","issue_events_url":"https://api.github.com/repos/IanWhitney/x-common/issues/events{/number}","events_url":"https://api.github.com/repos/IanWhitney/x-common/events","assignees_url":"https://api.github.com/repos/IanWhitney/x-common/assignees{/user}","branches_url":"https://api.github.com/repos/IanWhitney/x-common/branches{/branch}","tags_url":"https://api.github.com/repos/IanWhitney/x-common/tags","blobs_url":"https://api.github.com/repos/IanWhitney/x-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IanWhitney/x-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IanWhitney/x-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/IanWhitney/x-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IanWhitney/x-common/statuses/{sha}","languages_url":"https://api.github.com/repos/IanWhitney/x-common/languages","stargazers_url":"https://api.github.com/repos/IanWhitney/x-common/stargazers","contributors_url":"https://api.github.com/repos/IanWhitney/x-common/contributors","subscribers_url":"https://api.github.com/repos/IanWhitney/x-common/subscribers","subscription_url":"https://api.github.com/repos/IanWhitney/x-common/subscription","commits_url":"https://api.github.com/repos/IanWhitney/x-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/IanWhitney/x-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/IanWhitney/x-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/IanWhitney/x-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/IanWhitney/x-common/contents/{+path}","compare_url":"https://api.github.com/repos/IanWhitney/x-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IanWhitney/x-common/merges","archive_url":"https://api.github.com/repos/IanWhitney/x-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IanWhitney/x-common/downloads","issues_url":"https://api.github.com/repos/IanWhitney/x-common/issues{/number}","pulls_url":"https://api.github.com/repos/IanWhitney/x-common/pulls{/number}","milestones_url":"https://api.github.com/repos/IanWhitney/x-common/milestones{/number}","notifications_url":"https://api.github.com/repos/IanWhitney/x-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IanWhitney/x-common/labels{/name}","releases_url":"https://api.github.com/repos/IanWhitney/x-common/releases{/id}","deployments_url":"https://api.github.com/repos/IanWhitney/x-common/deployments","created_at":"2016-03-27T13:10:01Z","updated_at":"2016-03-27T13:10:02Z","pushed_at":"2016-03-27T16:23:36Z","git_url":"git://github.com/IanWhitney/x-common.git","ssh_url":"git@github.com:IanWhitney/x-common.git","clone_url":"https://github.com/IanWhitney/x-common.git","svn_url":"https://github.com/IanWhitney/x-common","homepage":null,"size":430,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"exercism:master","ref":"master","sha":"411222fe3202860b8866e4d6ae465e1810a5643d","user":{"login":"exercism","id":5624255,"avatar_url":"https://avatars.githubusercontent.com/u/5624255?v=3","gravatar_id":"","url":"https://api.github.com/users/exercism","html_url":"https://github.com/exercism","followers_url":"https://api.github.com/users/exercism/followers","following_url":"https://api.github.com/users/exercism/following{/other_user}","gists_url":"https://api.github.com/users/exercism/gists{/gist_id}","starred_url":"https://api.github.com/users/exercism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exercism/subscriptions","organizations_url":"https://api.github.com/users/exercism/orgs","repos_url":"https://api.github.com/users/exercism/repos","events_url":"https://api.github.com/users/exercism/events{/privacy}","received_events_url":"https://api.github.com/users/exercism/received_events","type":"Organization","site_admin":false},"repo":{"id":17259886,"name":"x-common","full_name":"exercism/x-common","owner":{"login":"exercism","id":5624255,"avatar_url":"https://avatars.githubusercontent.com/u/5624255?v=3","gravatar_id":"","url":"https://api.github.com/users/exercism","html_url":"https://github.com/exercism","followers_url":"https://api.github.com/users/exercism/followers","following_url":"https://api.github.com/users/exercism/following{/other_user}","gists_url":"https://api.github.com/users/exercism/gists{/gist_id}","starred_url":"https://api.github.com/users/exercism/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/exercism/subscriptions","organizations_url":"https://api.github.com/users/exercism/orgs","repos_url":"https://api.github.com/users/exercism/repos","events_url":"https://api.github.com/users/exercism/events{/privacy}","received_events_url":"https://api.github.com/users/exercism/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/exercism/x-common","description":"Shared metadata for exercism exercises.","fork":false,"url":"https://api.github.com/repos/exercism/x-common","forks_url":"https://api.github.com/repos/exercism/x-common/forks","keys_url":"https://api.github.com/repos/exercism/x-common/keys{/key_id}","collaborators_url":"https://api.github.com/repos/exercism/x-common/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/exercism/x-common/teams","hooks_url":"https://api.github.com/repos/exercism/x-common/hooks","issue_events_url":"https://api.github.com/repos/exercism/x-common/issues/events{/number}","events_url":"https://api.github.com/repos/exercism/x-common/events","assignees_url":"https://api.github.com/repos/exercism/x-common/assignees{/user}","branches_url":"https://api.github.com/repos/exercism/x-common/branches{/branch}","tags_url":"https://api.github.com/repos/exercism/x-common/tags","blobs_url":"https://api.github.com/repos/exercism/x-common/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/exercism/x-common/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/exercism/x-common/git/refs{/sha}","trees_url":"https://api.github.com/repos/exercism/x-common/git/trees{/sha}","statuses_url":"https://api.github.com/repos/exercism/x-common/statuses/{sha}","languages_url":"https://api.github.com/repos/exercism/x-common/languages","stargazers_url":"https://api.github.com/repos/exercism/x-common/stargazers","contributors_url":"https://api.github.com/repos/exercism/x-common/contributors","subscribers_url":"https://api.github.com/repos/exercism/x-common/subscribers","subscription_url":"https://api.github.com/repos/exercism/x-common/subscription","commits_url":"https://api.github.com/repos/exercism/x-common/commits{/sha}","git_commits_url":"https://api.github.com/repos/exercism/x-common/git/commits{/sha}","comments_url":"https://api.github.com/repos/exercism/x-common/comments{/number}","issue_comment_url":"https://api.github.com/repos/exercism/x-common/issues/comments{/number}","contents_url":"https://api.github.com/repos/exercism/x-common/contents/{+path}","compare_url":"https://api.github.com/repos/exercism/x-common/compare/{base}...{head}","merges_url":"https://api.github.com/repos/exercism/x-common/merges","archive_url":"https://api.github.com/repos/exercism/x-common/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/exercism/x-common/downloads","issues_url":"https://api.github.com/repos/exercism/x-common/issues{/number}","pulls_url":"https://api.github.com/repos/exercism/x-common/pulls{/number}","milestones_url":"https://api.github.com/repos/exercism/x-common/milestones{/number}","notifications_url":"https://api.github.com/repos/exercism/x-common/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/exercism/x-common/labels{/name}","releases_url":"https://api.github.com/repos/exercism/x-common/releases{/id}","deployments_url":"https://api.github.com/repos/exercism/x-common/deployments","created_at":"2014-02-27T18:40:48Z","updated_at":"2016-03-27T18:00:13Z","pushed_at":"2016-03-27T22:35:37Z","git_url":"git://github.com/exercism/x-common.git","ssh_url":"git@github.com:exercism/x-common.git","clone_url":"https://github.com/exercism/x-common.git","svn_url":"https://github.com/exercism/x-common","homepage":null,"size":534,"stargazers_count":46,"watchers_count":46,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":79,"mirror_url":null,"open_issues_count":38,"forks":79,"open_issues":38,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/exercism/x-common/pulls/211"},"html":{"href":"https://github.com/exercism/x-common/pull/211"},"issue":{"href":"https://api.github.com/repos/exercism/x-common/issues/211"},"comments":{"href":"https://api.github.com/repos/exercism/x-common/issues/211/comments"},"review_comments":{"href":"https://api.github.com/repos/exercism/x-common/pulls/211/comments"},"review_comment":{"href":"https://api.github.com/repos/exercism/x-common/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/exercism/x-common/pulls/211/commits"},"statuses":{"href":"https://api.github.com/repos/exercism/x-common/statuses/ed35c0fdcdd59da5e3356a1682abd39f6ca59414"}}}}