{"action":"created","comment":{"url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/pulls/comments/60676111","id":60676111,"diff_hunk":"@@ -4,37 +4,42 @@\n \n import com.jfoenix.effects.JFXDepthManager;\n \n+import aeneas.models.Bullpen;\n import aeneas.models.Model;\n import aeneas.models.Piece;\n \n import javafx.geometry.Pos;\n import javafx.scene.layout.Pane;\n import javafx.scene.layout.VBox;\n \n-class BullpenView {\n+public class BullpenView {\n \n   VBox bullpenBox;\n-  Pane levelView ;\n+  Pane levelView;\n \n-  private static final int SQUARE_SIZE = 16;\n+  static final int SQUARE_SIZE = 16;\n \n   ArrayList<Pane> values = new ArrayList<Pane>();\n \n-  BullpenView(VBox bullpenBox, Pane levelView){\n+  public BullpenView(VBox bullpenBox, Pane levelView){\n     this.levelView = levelView;\n     this.bullpenBox = bullpenBox;\n     JFXDepthManager.setDepth(bullpenBox, 1);\n     bullpenBox.setAlignment(Pos.TOP_CENTER);\n   }\n \n-  void addPiece(Piece piece, Model model){\n-    Pane piecePane = new Pane();\n-    PieceView pieceView = new PieceView(levelView, piece, model, SQUARE_SIZE);\n-    pieceView.setId(piece.toString()); //this relies on all instances having different to strings\n-    piecePane.getChildren().add(pieceView);\n-    values.add(piecePane);\n-    bullpenBox.getChildren().add(piecePane);\n-  }\n+  public void refresh(Model model, Bullpen bullpen) {\n \n+    bullpenBox.getChildren().clear();\n \n+    for (int i=bullpen.getPieces().size() - 1; i >= 0; i-- ) {\n+      Piece piece = bullpen.getPieces().get(i);\n+      Pane piecePane = new Pane();\n+      PieceView pieceView = new PieceView(levelView, piece, model, SQUARE_SIZE);\n+      pieceView.setId(piece.toString()); //this relies on all instances having different to strings","path":"src/main/java/aeneas/views/BullpenView.java","position":48,"original_position":48,"commit_id":"021735bfb31687c4cb58986e2da4f22e7e88928c","original_commit_id":"021735bfb31687c4cb58986e2da4f22e7e88928c","user":{"login":"jkuszmaul","id":4754043,"avatar_url":"https://avatars.githubusercontent.com/u/4754043?v=3","gravatar_id":"","url":"https://api.github.com/users/jkuszmaul","html_url":"https://github.com/jkuszmaul","followers_url":"https://api.github.com/users/jkuszmaul/followers","following_url":"https://api.github.com/users/jkuszmaul/following{/other_user}","gists_url":"https://api.github.com/users/jkuszmaul/gists{/gist_id}","starred_url":"https://api.github.com/users/jkuszmaul/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jkuszmaul/subscriptions","organizations_url":"https://api.github.com/users/jkuszmaul/orgs","repos_url":"https://api.github.com/users/jkuszmaul/repos","events_url":"https://api.github.com/users/jkuszmaul/events{/privacy}","received_events_url":"https://api.github.com/users/jkuszmaul/received_events","type":"User","site_admin":false},"body":"Does this even function as-is?","created_at":"2016-04-22T00:29:23Z","updated_at":"2016-04-22T00:29:23Z","html_url":"https://github.com/Cheddarpuffs/Aeneas-KabaSuji/pull/48#discussion_r60676111","pull_request_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/pulls/48","_links":{"self":{"href":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/pulls/comments/60676111"},"html":{"href":"https://github.com/Cheddarpuffs/Aeneas-KabaSuji/pull/48#discussion_r60676111"},"pull_request":{"href":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/pulls/48"}}},"pull_request":{"url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/pulls/48","id":67240146,"html_url":"https://github.com/Cheddarpuffs/Aeneas-KabaSuji/pull/48","diff_url":"https://github.com/Cheddarpuffs/Aeneas-KabaSuji/pull/48.diff","patch_url":"https://github.com/Cheddarpuffs/Aeneas-KabaSuji/pull/48.patch","issue_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/issues/48","number":48,"state":"open","locked":false,"title":"Allow add piece to bullpen","user":{"login":"PeterMitrano","id":4010770,"avatar_url":"https://avatars.githubusercontent.com/u/4010770?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterMitrano","html_url":"https://github.com/PeterMitrano","followers_url":"https://api.github.com/users/PeterMitrano/followers","following_url":"https://api.github.com/users/PeterMitrano/following{/other_user}","gists_url":"https://api.github.com/users/PeterMitrano/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterMitrano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterMitrano/subscriptions","organizations_url":"https://api.github.com/users/PeterMitrano/orgs","repos_url":"https://api.github.com/users/PeterMitrano/repos","events_url":"https://api.github.com/users/PeterMitrano/events{/privacy}","received_events_url":"https://api.github.com/users/PeterMitrano/received_events","type":"User","site_admin":false},"body":"#### What issue does this fix?\r\n\r\n - Issue #25 , adds piece to bullpen\r\n \r\n \r\n#### What features does this propose?\r\n\r\n - Dialog for adding pieces to bullpen\r\n - Add to bullpen move\r\n - Improve style on buttons\r\n\r\n#### What is missing\r\n\r\n - pieces aren't top aligned when they are added to the bullpen\r\n - move is not added to undo/redo stack\r\n \r\n \r\n#### Did you add tests to cover the code you propose?\r\n\r\n - added test for adding piece to puzzle (should fail) and editor (should succeed)\r\n\r\n\r\n","created_at":"2016-04-20T18:58:52Z","updated_at":"2016-04-22T00:29:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8ac7f760b9db26419787306a7be2c8bd0e8ff3c3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/pulls/48/commits","review_comments_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/pulls/48/comments","review_comment_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/issues/48/comments","statuses_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/statuses/021735bfb31687c4cb58986e2da4f22e7e88928c","head":{"label":"PeterMitrano:add_piece_to_bullpen","ref":"add_piece_to_bullpen","sha":"021735bfb31687c4cb58986e2da4f22e7e88928c","user":{"login":"PeterMitrano","id":4010770,"avatar_url":"https://avatars.githubusercontent.com/u/4010770?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterMitrano","html_url":"https://github.com/PeterMitrano","followers_url":"https://api.github.com/users/PeterMitrano/followers","following_url":"https://api.github.com/users/PeterMitrano/following{/other_user}","gists_url":"https://api.github.com/users/PeterMitrano/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterMitrano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterMitrano/subscriptions","organizations_url":"https://api.github.com/users/PeterMitrano/orgs","repos_url":"https://api.github.com/users/PeterMitrano/repos","events_url":"https://api.github.com/users/PeterMitrano/events{/privacy}","received_events_url":"https://api.github.com/users/PeterMitrano/received_events","type":"User","site_admin":false},"repo":{"id":55879053,"name":"Aeneas-KabaSuji","full_name":"PeterMitrano/Aeneas-KabaSuji","owner":{"login":"PeterMitrano","id":4010770,"avatar_url":"https://avatars.githubusercontent.com/u/4010770?v=3","gravatar_id":"","url":"https://api.github.com/users/PeterMitrano","html_url":"https://github.com/PeterMitrano","followers_url":"https://api.github.com/users/PeterMitrano/followers","following_url":"https://api.github.com/users/PeterMitrano/following{/other_user}","gists_url":"https://api.github.com/users/PeterMitrano/gists{/gist_id}","starred_url":"https://api.github.com/users/PeterMitrano/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PeterMitrano/subscriptions","organizations_url":"https://api.github.com/users/PeterMitrano/orgs","repos_url":"https://api.github.com/users/PeterMitrano/repos","events_url":"https://api.github.com/users/PeterMitrano/events{/privacy}","received_events_url":"https://api.github.com/users/PeterMitrano/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/PeterMitrano/Aeneas-KabaSuji","description":"Aeneas KabaSuji","fork":true,"url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji","forks_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/forks","keys_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/teams","hooks_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/hooks","issue_events_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/issues/events{/number}","events_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/events","assignees_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/assignees{/user}","branches_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/branches{/branch}","tags_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/tags","blobs_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/statuses/{sha}","languages_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/languages","stargazers_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/stargazers","contributors_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/contributors","subscribers_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/subscribers","subscription_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/subscription","commits_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/contents/{+path}","compare_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/merges","archive_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/downloads","issues_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/issues{/number}","pulls_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/pulls{/number}","milestones_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/milestones{/number}","notifications_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/labels{/name}","releases_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/releases{/id}","deployments_url":"https://api.github.com/repos/PeterMitrano/Aeneas-KabaSuji/deployments","created_at":"2016-04-10T03:33:52Z","updated_at":"2016-04-10T03:33:54Z","pushed_at":"2016-04-20T20:01:10Z","git_url":"git://github.com/PeterMitrano/Aeneas-KabaSuji.git","ssh_url":"git@github.com:PeterMitrano/Aeneas-KabaSuji.git","clone_url":"https://github.com/PeterMitrano/Aeneas-KabaSuji.git","svn_url":"https://github.com/PeterMitrano/Aeneas-KabaSuji","homepage":"","size":5183,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Cheddarpuffs:master","ref":"master","sha":"684483a9d94b789d5e127ea91075837f06d227dd","user":{"login":"Cheddarpuffs","id":17884699,"avatar_url":"https://avatars.githubusercontent.com/u/17884699?v=3","gravatar_id":"","url":"https://api.github.com/users/Cheddarpuffs","html_url":"https://github.com/Cheddarpuffs","followers_url":"https://api.github.com/users/Cheddarpuffs/followers","following_url":"https://api.github.com/users/Cheddarpuffs/following{/other_user}","gists_url":"https://api.github.com/users/Cheddarpuffs/gists{/gist_id}","starred_url":"https://api.github.com/users/Cheddarpuffs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cheddarpuffs/subscriptions","organizations_url":"https://api.github.com/users/Cheddarpuffs/orgs","repos_url":"https://api.github.com/users/Cheddarpuffs/repos","events_url":"https://api.github.com/users/Cheddarpuffs/events{/privacy}","received_events_url":"https://api.github.com/users/Cheddarpuffs/received_events","type":"Organization","site_admin":false},"repo":{"id":54702919,"name":"Aeneas-KabaSuji","full_name":"Cheddarpuffs/Aeneas-KabaSuji","owner":{"login":"Cheddarpuffs","id":17884699,"avatar_url":"https://avatars.githubusercontent.com/u/17884699?v=3","gravatar_id":"","url":"https://api.github.com/users/Cheddarpuffs","html_url":"https://github.com/Cheddarpuffs","followers_url":"https://api.github.com/users/Cheddarpuffs/followers","following_url":"https://api.github.com/users/Cheddarpuffs/following{/other_user}","gists_url":"https://api.github.com/users/Cheddarpuffs/gists{/gist_id}","starred_url":"https://api.github.com/users/Cheddarpuffs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Cheddarpuffs/subscriptions","organizations_url":"https://api.github.com/users/Cheddarpuffs/orgs","repos_url":"https://api.github.com/users/Cheddarpuffs/repos","events_url":"https://api.github.com/users/Cheddarpuffs/events{/privacy}","received_events_url":"https://api.github.com/users/Cheddarpuffs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Cheddarpuffs/Aeneas-KabaSuji","description":"The Official KabaSuji","fork":false,"url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji","forks_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/forks","keys_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/teams","hooks_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/hooks","issue_events_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/issues/events{/number}","events_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/events","assignees_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/assignees{/user}","branches_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/branches{/branch}","tags_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/tags","blobs_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/git/refs{/sha}","trees_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/statuses/{sha}","languages_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/languages","stargazers_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/stargazers","contributors_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/contributors","subscribers_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/subscribers","subscription_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/subscription","commits_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/commits{/sha}","git_commits_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/git/commits{/sha}","comments_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/comments{/number}","issue_comment_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/issues/comments{/number}","contents_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/contents/{+path}","compare_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/merges","archive_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/downloads","issues_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/issues{/number}","pulls_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/pulls{/number}","milestones_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/milestones{/number}","notifications_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/labels{/name}","releases_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/releases{/id}","deployments_url":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/deployments","created_at":"2016-03-25T07:36:39Z","updated_at":"2016-04-10T07:04:36Z","pushed_at":"2016-04-21T01:18:56Z","git_url":"git://github.com/Cheddarpuffs/Aeneas-KabaSuji.git","ssh_url":"git@github.com:Cheddarpuffs/Aeneas-KabaSuji.git","clone_url":"https://github.com/Cheddarpuffs/Aeneas-KabaSuji.git","svn_url":"https://github.com/Cheddarpuffs/Aeneas-KabaSuji","homepage":"http://cheddarpuffs.github.io/Aeneas-KabaSuji/","size":5190,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":2,"mirror_url":null,"open_issues_count":17,"forks":2,"open_issues":17,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/pulls/48"},"html":{"href":"https://github.com/Cheddarpuffs/Aeneas-KabaSuji/pull/48"},"issue":{"href":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/issues/48"},"comments":{"href":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/issues/48/comments"},"review_comments":{"href":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/pulls/48/comments"},"review_comment":{"href":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/pulls/48/commits"},"statuses":{"href":"https://api.github.com/repos/Cheddarpuffs/Aeneas-KabaSuji/statuses/021735bfb31687c4cb58986e2da4f22e7e88928c"}}}}