{"action":"created","comment":{"url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/pulls/comments/55640899","id":55640899,"diff_hunk":"@@ -1,50 +1,101 @@\n var should = require('chai').should(),\n     arbiter = require('../index'),\n-    loadmap = arbiter.loadmap,\n-    possiblemoves = arbiter.possiblemoves;\n+    load_map = arbiter.load_map,\n+    find_possible_moves = arbiter.find_possible_moves;\n \n-describe('#loadmap', function() {\n-    var map = loadmap(); // The traditional diplomacy map gets loaded by default\n+describe('#load_map', function() {\n+    var map = load_map(); // The traditional diplomacy map gets loaded by default\n \n     it('loads the traditional diplomacy map', function() {\n-        false.should.equal(true);\n+        map.should.have.property('territories').with.length(75);\n+        map.get_land_territories().should.have.length(56);\n+        map.get_coastal_territories().should.have.length(14); // Might be wrong? Counted on the fly...\n+        map.get_sea_territories().should.have.length(19);\n+        map.get_supply_points().should.have.length(34);\n     });\n \n-    it('has the proper movement graph', function () {\n-        false.should.equal(true);\n+    it('specifies number of players and their countries', function () {\n+        map.should.have.property('players').with.length(7);\n+        map.players.includes('Russia').should.equal(true);\n+        map.players.includes('Italy').should.equal(true);\n+        map.players.includes('Austria').should.equal(true);\n+        map.players.includes('Turkey').should.equal(true);\n+        map.players.includes('France').should.equal(true);\n+        map.players.includes('England').should.equal(true);\n+        map.players.includes('Germany').should.equal(true);\n     });\n \n-    it('has identifying abbreviations', function () {\n-        false.should.equal(true);\n-    });\n+    it('has home countries', function () {\n+        function are_all_supply(arr) {\n+            for (i = 0; i < arr.length; i++) {\n+                if (arr[i].supply != true) {\n+                    return false;\n+                }\n+            }\n+            return true;\n+        }\n \n-    it('specifies number of players and their countries', function () {\n-        false.should.equal(true);\n-    });\n+        var russian_territories = map.get_home_countries_for('Russia');\n+        // If you're thinking to yourself that the only way to support this is to prototype includes to use the aliases... You've got it!\n+        russian_territories.includes('StP').should.equal(true);\n+        russian_territories.includes('Sev').should.equal(true);\n+        russian_territories.includes('War').should.equal(true);\n+        russian_territories.includes('Mos').should.equal(true);\n \n-    it('specifies supply depots', function () {\n-        false.should.equal(true);\n-    });\n+        var italian_territories = map.get_home_countries_for('Italy');\n+        italian_territories.includes('Ven').should.equal(true);\n+        italian_territories.includes('Rom').should.equal(true);\n+        italian_territories.includes('Nap').should.equal(true);\n \n-    it('has home countries', function () {\n-        false.should.equal(true);\n-    });\n+        var austrian_territories = map.get_home_countries_for('Austria');\n+        austrian_territories.includes('Vie').should.equal(true);\n+        austrian_territories.includes('Bud').should.equal(true);\n+        austrian_territories.includes('Tri').should.equal(true);\n \n-    it('specifies types of territories', function () {\n-        false.should.equal(true);\n-    });\n+        var turkish_territories = map.get_home_countries_for('Turkey');\n+        turkish_territories.includes('Con').should.equal(true);\n+        turkish_territories.includes('Ank').should.equal(true);\n+        turkish_territories.includes('Smy').should.equal(true);\n \n-    it('displays the full name if possible', function () {\n-        false.should.equal(true);\n+        var french_territories = map.get_home_countries_for('France');\n+        french_territories.includes('Par').should.equal(true);\n+        french_territories.includes('Bre').should.equal(true);\n+        french_territories.includes('Mar').should.equal(true);\n+\n+        var english_territories = map.get_home_countries_for('English');\n+        english_territories.includes('Lon').should.equal(true);\n+        english_territories.includes('Edi').should.equal(true);\n+        english_territories.includes('Liv').should.equal(true);\n+\n+        var german_territories = map.get_home_countries_for('Germany');\n+        german_territories.includes('Mun').should.equal(true);\n+        german_territories.includes('Kie').should.equal(true);\n+        german_territories.includes('Ber').should.equal(true);\n+\n+        are_all_supply(russian_territories).should.equal(true);\n+        are_all_supply(italian_territories).should.equal(true);\n+        are_all_supply(austrian_territories).should.equal(true);\n+        are_all_supply(turkish_territories).should.equal(true);\n+        are_all_supply(french_territories).should.equal(true);\n+        are_all_supply(english_territories).should.equal(true);\n+        are_all_supply(german_territories).should.equal(true);","path":"test/arbiter.js","position":105,"original_position":105,"commit_id":"69dbc3fb0bb3f51d5a2d3e604da333ef0d660084","original_commit_id":"69dbc3fb0bb3f51d5a2d3e604da333ef0d660084","user":{"login":"ChadFong","id":9373445,"avatar_url":"https://avatars.githubusercontent.com/u/9373445?v=3","gravatar_id":"","url":"https://api.github.com/users/ChadFong","html_url":"https://github.com/ChadFong","followers_url":"https://api.github.com/users/ChadFong/followers","following_url":"https://api.github.com/users/ChadFong/following{/other_user}","gists_url":"https://api.github.com/users/ChadFong/gists{/gist_id}","starred_url":"https://api.github.com/users/ChadFong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ChadFong/subscriptions","organizations_url":"https://api.github.com/users/ChadFong/orgs","repos_url":"https://api.github.com/users/ChadFong/repos","events_url":"https://api.github.com/users/ChadFong/events{/privacy}","received_events_url":"https://api.github.com/users/ChadFong/received_events","type":"User","site_admin":false},"body":"Again, all those territories aren't all supply.  I think 3 of each are though...","created_at":"2016-03-10T07:04:51Z","updated_at":"2016-03-10T07:04:51Z","html_url":"https://github.com/nicholaswold/diplomacy-arbiter/pull/6#discussion_r55640899","pull_request_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/pulls/6","_links":{"self":{"href":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/pulls/comments/55640899"},"html":{"href":"https://github.com/nicholaswold/diplomacy-arbiter/pull/6#discussion_r55640899"},"pull_request":{"href":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/pulls/6"}}},"pull_request":{"url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/pulls/6","id":62342192,"html_url":"https://github.com/nicholaswold/diplomacy-arbiter/pull/6","diff_url":"https://github.com/nicholaswold/diplomacy-arbiter/pull/6.diff","patch_url":"https://github.com/nicholaswold/diplomacy-arbiter/pull/6.patch","issue_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/issues/6","number":6,"state":"open","locked":false,"title":"Add tests for arbiter.load_map","user":{"login":"nicholaswold","id":1581984,"avatar_url":"https://avatars.githubusercontent.com/u/1581984?v=3","gravatar_id":"","url":"https://api.github.com/users/nicholaswold","html_url":"https://github.com/nicholaswold","followers_url":"https://api.github.com/users/nicholaswold/followers","following_url":"https://api.github.com/users/nicholaswold/following{/other_user}","gists_url":"https://api.github.com/users/nicholaswold/gists{/gist_id}","starred_url":"https://api.github.com/users/nicholaswold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicholaswold/subscriptions","organizations_url":"https://api.github.com/users/nicholaswold/orgs","repos_url":"https://api.github.com/users/nicholaswold/repos","events_url":"https://api.github.com/users/nicholaswold/events{/privacy}","received_events_url":"https://api.github.com/users/nicholaswold/received_events","type":"User","site_admin":false},"body":"Interested in seeing if these tests make sense to @ChadFong and @dbittman. Also pick this apart to see if this explains enough about the need here that you could program the implementation using just these tests as the spec.","created_at":"2016-03-10T05:40:39Z","updated_at":"2016-03-10T07:04:51Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d899d522878807fc6acbe56c9f3393f5a752a65d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/pulls/6/commits","review_comments_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/pulls/6/comments","review_comment_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/issues/6/comments","statuses_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/statuses/69dbc3fb0bb3f51d5a2d3e604da333ef0d660084","head":{"label":"nicholaswold:load-map-tests","ref":"load-map-tests","sha":"69dbc3fb0bb3f51d5a2d3e604da333ef0d660084","user":{"login":"nicholaswold","id":1581984,"avatar_url":"https://avatars.githubusercontent.com/u/1581984?v=3","gravatar_id":"","url":"https://api.github.com/users/nicholaswold","html_url":"https://github.com/nicholaswold","followers_url":"https://api.github.com/users/nicholaswold/followers","following_url":"https://api.github.com/users/nicholaswold/following{/other_user}","gists_url":"https://api.github.com/users/nicholaswold/gists{/gist_id}","starred_url":"https://api.github.com/users/nicholaswold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicholaswold/subscriptions","organizations_url":"https://api.github.com/users/nicholaswold/orgs","repos_url":"https://api.github.com/users/nicholaswold/repos","events_url":"https://api.github.com/users/nicholaswold/events{/privacy}","received_events_url":"https://api.github.com/users/nicholaswold/received_events","type":"User","site_admin":false},"repo":{"id":53169003,"name":"diplomacy-arbiter","full_name":"nicholaswold/diplomacy-arbiter","owner":{"login":"nicholaswold","id":1581984,"avatar_url":"https://avatars.githubusercontent.com/u/1581984?v=3","gravatar_id":"","url":"https://api.github.com/users/nicholaswold","html_url":"https://github.com/nicholaswold","followers_url":"https://api.github.com/users/nicholaswold/followers","following_url":"https://api.github.com/users/nicholaswold/following{/other_user}","gists_url":"https://api.github.com/users/nicholaswold/gists{/gist_id}","starred_url":"https://api.github.com/users/nicholaswold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicholaswold/subscriptions","organizations_url":"https://api.github.com/users/nicholaswold/orgs","repos_url":"https://api.github.com/users/nicholaswold/repos","events_url":"https://api.github.com/users/nicholaswold/events{/privacy}","received_events_url":"https://api.github.com/users/nicholaswold/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nicholaswold/diplomacy-arbiter","description":"Something I can use to compile and visualize my Diplomacy games","fork":false,"url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter","forks_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/forks","keys_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/teams","hooks_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/hooks","issue_events_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/issues/events{/number}","events_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/events","assignees_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/assignees{/user}","branches_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/branches{/branch}","tags_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/tags","blobs_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/git/refs{/sha}","trees_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/statuses/{sha}","languages_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/languages","stargazers_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/stargazers","contributors_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/contributors","subscribers_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/subscribers","subscription_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/subscription","commits_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/commits{/sha}","git_commits_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/git/commits{/sha}","comments_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/comments{/number}","issue_comment_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/issues/comments{/number}","contents_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/contents/{+path}","compare_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/merges","archive_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/downloads","issues_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/issues{/number}","pulls_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/pulls{/number}","milestones_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/milestones{/number}","notifications_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/labels{/name}","releases_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/releases{/id}","deployments_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/deployments","created_at":"2016-03-04T22:16:06Z","updated_at":"2016-03-05T22:10:05Z","pushed_at":"2016-03-10T05:43:08Z","git_url":"git://github.com/nicholaswold/diplomacy-arbiter.git","ssh_url":"git@github.com:nicholaswold/diplomacy-arbiter.git","clone_url":"https://github.com/nicholaswold/diplomacy-arbiter.git","svn_url":"https://github.com/nicholaswold/diplomacy-arbiter","homepage":null,"size":22,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":1,"default_branch":"master"}},"base":{"label":"nicholaswold:master","ref":"master","sha":"37b85f055161e1518a1c6a9b3fb5acf01fc16f7b","user":{"login":"nicholaswold","id":1581984,"avatar_url":"https://avatars.githubusercontent.com/u/1581984?v=3","gravatar_id":"","url":"https://api.github.com/users/nicholaswold","html_url":"https://github.com/nicholaswold","followers_url":"https://api.github.com/users/nicholaswold/followers","following_url":"https://api.github.com/users/nicholaswold/following{/other_user}","gists_url":"https://api.github.com/users/nicholaswold/gists{/gist_id}","starred_url":"https://api.github.com/users/nicholaswold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicholaswold/subscriptions","organizations_url":"https://api.github.com/users/nicholaswold/orgs","repos_url":"https://api.github.com/users/nicholaswold/repos","events_url":"https://api.github.com/users/nicholaswold/events{/privacy}","received_events_url":"https://api.github.com/users/nicholaswold/received_events","type":"User","site_admin":false},"repo":{"id":53169003,"name":"diplomacy-arbiter","full_name":"nicholaswold/diplomacy-arbiter","owner":{"login":"nicholaswold","id":1581984,"avatar_url":"https://avatars.githubusercontent.com/u/1581984?v=3","gravatar_id":"","url":"https://api.github.com/users/nicholaswold","html_url":"https://github.com/nicholaswold","followers_url":"https://api.github.com/users/nicholaswold/followers","following_url":"https://api.github.com/users/nicholaswold/following{/other_user}","gists_url":"https://api.github.com/users/nicholaswold/gists{/gist_id}","starred_url":"https://api.github.com/users/nicholaswold/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicholaswold/subscriptions","organizations_url":"https://api.github.com/users/nicholaswold/orgs","repos_url":"https://api.github.com/users/nicholaswold/repos","events_url":"https://api.github.com/users/nicholaswold/events{/privacy}","received_events_url":"https://api.github.com/users/nicholaswold/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nicholaswold/diplomacy-arbiter","description":"Something I can use to compile and visualize my Diplomacy games","fork":false,"url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter","forks_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/forks","keys_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/teams","hooks_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/hooks","issue_events_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/issues/events{/number}","events_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/events","assignees_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/assignees{/user}","branches_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/branches{/branch}","tags_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/tags","blobs_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/git/refs{/sha}","trees_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/statuses/{sha}","languages_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/languages","stargazers_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/stargazers","contributors_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/contributors","subscribers_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/subscribers","subscription_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/subscription","commits_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/commits{/sha}","git_commits_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/git/commits{/sha}","comments_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/comments{/number}","issue_comment_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/issues/comments{/number}","contents_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/contents/{+path}","compare_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/merges","archive_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/downloads","issues_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/issues{/number}","pulls_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/pulls{/number}","milestones_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/milestones{/number}","notifications_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/labels{/name}","releases_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/releases{/id}","deployments_url":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/deployments","created_at":"2016-03-04T22:16:06Z","updated_at":"2016-03-05T22:10:05Z","pushed_at":"2016-03-10T05:43:08Z","git_url":"git://github.com/nicholaswold/diplomacy-arbiter.git","ssh_url":"git@github.com:nicholaswold/diplomacy-arbiter.git","clone_url":"https://github.com/nicholaswold/diplomacy-arbiter.git","svn_url":"https://github.com/nicholaswold/diplomacy-arbiter","homepage":null,"size":22,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":5,"forks":1,"open_issues":5,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/pulls/6"},"html":{"href":"https://github.com/nicholaswold/diplomacy-arbiter/pull/6"},"issue":{"href":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/issues/6"},"comments":{"href":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/issues/6/comments"},"review_comments":{"href":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/pulls/6/comments"},"review_comment":{"href":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/pulls/6/commits"},"statuses":{"href":"https://api.github.com/repos/nicholaswold/diplomacy-arbiter/statuses/69dbc3fb0bb3f51d5a2d3e604da333ef0d660084"}}}}