{"action":"created","comment":{"url":"https://api.github.com/repos/MrCrime/ContextMigi-1/pulls/comments/66065651","id":66065651,"diff_hunk":"@@ -0,0 +1,119 @@\n+package com.github.migi_1.ContextApp;\n+\n+import android.widget.Button;\n+import com.github.migi_1.ContextMessages.PlatformPosition;\n+\n+/**\n+ * This class contains the functions that retrieve the buttons to add \n+ * functions to.\n+ */\n+public class MakeButtonFunctions {\n+    \n+    private MainActivity act;\n+    \n+    public Button left;\n+    public Button middle;\n+    public Button right;\n+    public Button trigger;\n+    \n+    /**\n+     * This creates an instance of the MakeButtonFunctions.\n+     * @param act\n+     * \t\t\tThe instance of the application that calls this function\n+     */\n+    public MakeButtonFunctions(MainActivity act) {\n+\n+        this.act = act;\n+\n+    }\n+    \n+    /**\n+     * Sets the buttons for the android UI.\n+     * @param position \n+     *              The PlatformPosition of the player.\n+     */\n+    public void setButtons(PlatformPosition position) {\n+        left = (Button) act.findViewById(R.id.Button_left);\n+        middle = (Button) act.findViewById(R.id.Button_middle);\n+        right = (Button) act.findViewById(R.id.Button_right);\n+        trigger = (Button) act.findViewById(R.id.Button_trigger);\n+        \n+        setButtonText(position);\n+        trigger.setText(\"Trigger\");\n+        \n+        act.setButtonClick(left, \"left\");\n+        act.setButtonClick(middle, \"middle\");\n+        act.setButtonClick(right, \"right\");\n+        act.setButtonClick(trigger, \"trigger\");\n+    }\n+    \n+    /**\n+     * Chooses which function to call to set the attack buttons' text,\n+     * based on the position.\n+     * @param position \n+     *              The PlatformPosition of the player.\n+     */\n+    public void setButtonText(PlatformPosition position) {\n+        \n+        switch (position) {\n+            case FRONTLEFT :\n+                setFLText();\n+                break;\n+            case BACKRIGHT :\n+                setBRText();\n+                break;\n+            case BACKLEFT :\n+                setBLText();\n+                break;\n+            default :\n+                setFRText();\n+                break;\n+        }\n+        \n+    }\n+    \n+    /**\n+     * Sets the text of the attack buttons for the front right player.\n+     */\n+    public void setFRText() {\n+        \n+        left.setText(\"HIT NW\");\n+        middle.setText(\"HIT NE\");\n+        right.setText(\"HIT SE\");\n+        \n+    }\n+    \n+    /**\n+     * Sets the text of the attack buttons for the front left player.\n+     */\n+    public void setFLText() {\n+        \n+        left.setText(\"HIT SW\");\n+        middle.setText(\"HIT NW\");\n+        right.setText(\"HIT NE\");\n+        \n+    }\n+    \n+    /**\n+     * Sets the text of the attack buttons for the back right player.\n+     */\n+    public void setBRText() {\n+        \n+        left.setText(\"HIT NE\");\n+        middle.setText(\"HIT SE\");\n+        right.setText(\"HIT SW\");\n+        \n+    }\n+    \n+    /**\n+     * Sets the text of the attack buttons for the back left player.\n+     */\n+    public void setBLText() {\n+        \n+        left.setText(\"HIT SE\");\n+        middle.setText(\"HIT SW\");\n+        right.setText(\"HIT NW\");\n+        ","path":"ContextApp/src/main/java/com/github/migi_1/ContextApp/MakeButtonFunctions.java","position":116,"original_position":116,"commit_id":"9a3d8b13b4e12468c37cbdc09e53169eb5071d56","original_commit_id":"9a3d8b13b4e12468c37cbdc09e53169eb5071d56","user":{"login":"marcelkuipers","id":9715492,"avatar_url":"https://avatars.githubusercontent.com/u/9715492?v=3","gravatar_id":"","url":"https://api.github.com/users/marcelkuipers","html_url":"https://github.com/marcelkuipers","followers_url":"https://api.github.com/users/marcelkuipers/followers","following_url":"https://api.github.com/users/marcelkuipers/following{/other_user}","gists_url":"https://api.github.com/users/marcelkuipers/gists{/gist_id}","starred_url":"https://api.github.com/users/marcelkuipers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marcelkuipers/subscriptions","organizations_url":"https://api.github.com/users/marcelkuipers/orgs","repos_url":"https://api.github.com/users/marcelkuipers/repos","events_url":"https://api.github.com/users/marcelkuipers/events{/privacy}","received_events_url":"https://api.github.com/users/marcelkuipers/received_events","type":"User","site_admin":false},"body":"You don't need four methods to achieve this. You can also make a list of strings that need to be added to the buttons and let these lists depend on the player's role.","created_at":"2016-06-07T13:02:20Z","updated_at":"2016-06-07T13:02:20Z","html_url":"https://github.com/MrCrime/ContextMigi-1/pull/66#discussion_r66065651","pull_request_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/pulls/66","_links":{"self":{"href":"https://api.github.com/repos/MrCrime/ContextMigi-1/pulls/comments/66065651"},"html":{"href":"https://github.com/MrCrime/ContextMigi-1/pull/66#discussion_r66065651"},"pull_request":{"href":"https://api.github.com/repos/MrCrime/ContextMigi-1/pulls/66"}}},"pull_request":{"url":"https://api.github.com/repos/MrCrime/ContextMigi-1/pulls/66","id":71998776,"html_url":"https://github.com/MrCrime/ContextMigi-1/pull/66","diff_url":"https://github.com/MrCrime/ContextMigi-1/pull/66.diff","patch_url":"https://github.com/MrCrime/ContextMigi-1/pull/66.patch","issue_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/issues/66","number":66,"state":"open","locked":false,"title":"Feature: taking and dealing damage","user":{"login":"ThatFlint","id":9696198,"avatar_url":"https://avatars.githubusercontent.com/u/9696198?v=3","gravatar_id":"","url":"https://api.github.com/users/ThatFlint","html_url":"https://github.com/ThatFlint","followers_url":"https://api.github.com/users/ThatFlint/followers","following_url":"https://api.github.com/users/ThatFlint/following{/other_user}","gists_url":"https://api.github.com/users/ThatFlint/gists{/gist_id}","starred_url":"https://api.github.com/users/ThatFlint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ThatFlint/subscriptions","organizations_url":"https://api.github.com/users/ThatFlint/orgs","repos_url":"https://api.github.com/users/ThatFlint/repos","events_url":"https://api.github.com/users/ThatFlint/events{/privacy}","received_events_url":"https://api.github.com/users/ThatFlint/received_events","type":"User","site_admin":false},"body":"In this branch, two features were added:\r\n- When a player takes damage or their health is set, data containing the new health value and the player's position is sent from the server to the client, where the hearts that indicate the player's health are updated.\r\n- When a player presses one of the three attack buttons, data containing their position and attack direction is sent from client to server, where the attack will be processed.","created_at":"2016-05-31T11:23:01Z","updated_at":"2016-06-07T13:02:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ccee4e3ab98d02d1c91f9de39c10c567dce3dbc6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/pulls/66/commits","review_comments_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/pulls/66/comments","review_comment_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/pulls/comments{/number}","comments_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/issues/66/comments","statuses_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/statuses/9a3d8b13b4e12468c37cbdc09e53169eb5071d56","head":{"label":"MrCrime:feature_AppHealthAndDamage","ref":"feature_AppHealthAndDamage","sha":"9a3d8b13b4e12468c37cbdc09e53169eb5071d56","user":{"login":"MrCrime","id":9739325,"avatar_url":"https://avatars.githubusercontent.com/u/9739325?v=3","gravatar_id":"","url":"https://api.github.com/users/MrCrime","html_url":"https://github.com/MrCrime","followers_url":"https://api.github.com/users/MrCrime/followers","following_url":"https://api.github.com/users/MrCrime/following{/other_user}","gists_url":"https://api.github.com/users/MrCrime/gists{/gist_id}","starred_url":"https://api.github.com/users/MrCrime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrCrime/subscriptions","organizations_url":"https://api.github.com/users/MrCrime/orgs","repos_url":"https://api.github.com/users/MrCrime/repos","events_url":"https://api.github.com/users/MrCrime/events{/privacy}","received_events_url":"https://api.github.com/users/MrCrime/received_events","type":"User","site_admin":false},"repo":{"id":56761052,"name":"ContextMigi-1","full_name":"MrCrime/ContextMigi-1","owner":{"login":"MrCrime","id":9739325,"avatar_url":"https://avatars.githubusercontent.com/u/9739325?v=3","gravatar_id":"","url":"https://api.github.com/users/MrCrime","html_url":"https://github.com/MrCrime","followers_url":"https://api.github.com/users/MrCrime/followers","following_url":"https://api.github.com/users/MrCrime/following{/other_user}","gists_url":"https://api.github.com/users/MrCrime/gists{/gist_id}","starred_url":"https://api.github.com/users/MrCrime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrCrime/subscriptions","organizations_url":"https://api.github.com/users/MrCrime/orgs","repos_url":"https://api.github.com/users/MrCrime/repos","events_url":"https://api.github.com/users/MrCrime/events{/privacy}","received_events_url":"https://api.github.com/users/MrCrime/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MrCrime/ContextMigi-1","description":"[TI2806] Context Project - Computer Games - MIGI#1","fork":false,"url":"https://api.github.com/repos/MrCrime/ContextMigi-1","forks_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/forks","keys_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/teams","hooks_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/hooks","issue_events_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/issues/events{/number}","events_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/events","assignees_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/assignees{/user}","branches_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/branches{/branch}","tags_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/tags","blobs_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/statuses/{sha}","languages_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/languages","stargazers_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/stargazers","contributors_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/contributors","subscribers_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/subscribers","subscription_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/subscription","commits_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/contents/{+path}","compare_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/merges","archive_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/downloads","issues_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/issues{/number}","pulls_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/pulls{/number}","milestones_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/milestones{/number}","notifications_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/labels{/name}","releases_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/releases{/id}","deployments_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/deployments","created_at":"2016-04-21T09:31:41Z","updated_at":"2016-04-21T09:31:48Z","pushed_at":"2016-06-07T12:59:12Z","git_url":"git://github.com/MrCrime/ContextMigi-1.git","ssh_url":"git@github.com:MrCrime/ContextMigi-1.git","clone_url":"https://github.com/MrCrime/ContextMigi-1.git","svn_url":"https://github.com/MrCrime/ContextMigi-1","homepage":null,"size":56890,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"MrCrime:master","ref":"master","sha":"7f6c2b29b1d6ca80bfe429e7a0577efd01bccafd","user":{"login":"MrCrime","id":9739325,"avatar_url":"https://avatars.githubusercontent.com/u/9739325?v=3","gravatar_id":"","url":"https://api.github.com/users/MrCrime","html_url":"https://github.com/MrCrime","followers_url":"https://api.github.com/users/MrCrime/followers","following_url":"https://api.github.com/users/MrCrime/following{/other_user}","gists_url":"https://api.github.com/users/MrCrime/gists{/gist_id}","starred_url":"https://api.github.com/users/MrCrime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrCrime/subscriptions","organizations_url":"https://api.github.com/users/MrCrime/orgs","repos_url":"https://api.github.com/users/MrCrime/repos","events_url":"https://api.github.com/users/MrCrime/events{/privacy}","received_events_url":"https://api.github.com/users/MrCrime/received_events","type":"User","site_admin":false},"repo":{"id":56761052,"name":"ContextMigi-1","full_name":"MrCrime/ContextMigi-1","owner":{"login":"MrCrime","id":9739325,"avatar_url":"https://avatars.githubusercontent.com/u/9739325?v=3","gravatar_id":"","url":"https://api.github.com/users/MrCrime","html_url":"https://github.com/MrCrime","followers_url":"https://api.github.com/users/MrCrime/followers","following_url":"https://api.github.com/users/MrCrime/following{/other_user}","gists_url":"https://api.github.com/users/MrCrime/gists{/gist_id}","starred_url":"https://api.github.com/users/MrCrime/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MrCrime/subscriptions","organizations_url":"https://api.github.com/users/MrCrime/orgs","repos_url":"https://api.github.com/users/MrCrime/repos","events_url":"https://api.github.com/users/MrCrime/events{/privacy}","received_events_url":"https://api.github.com/users/MrCrime/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MrCrime/ContextMigi-1","description":"[TI2806] Context Project - Computer Games - MIGI#1","fork":false,"url":"https://api.github.com/repos/MrCrime/ContextMigi-1","forks_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/forks","keys_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/teams","hooks_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/hooks","issue_events_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/issues/events{/number}","events_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/events","assignees_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/assignees{/user}","branches_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/branches{/branch}","tags_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/tags","blobs_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/git/refs{/sha}","trees_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/statuses/{sha}","languages_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/languages","stargazers_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/stargazers","contributors_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/contributors","subscribers_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/subscribers","subscription_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/subscription","commits_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/commits{/sha}","git_commits_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/git/commits{/sha}","comments_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/comments{/number}","issue_comment_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/issues/comments{/number}","contents_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/contents/{+path}","compare_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/merges","archive_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/downloads","issues_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/issues{/number}","pulls_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/pulls{/number}","milestones_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/milestones{/number}","notifications_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/labels{/name}","releases_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/releases{/id}","deployments_url":"https://api.github.com/repos/MrCrime/ContextMigi-1/deployments","created_at":"2016-04-21T09:31:41Z","updated_at":"2016-04-21T09:31:48Z","pushed_at":"2016-06-07T12:59:12Z","git_url":"git://github.com/MrCrime/ContextMigi-1.git","ssh_url":"git@github.com:MrCrime/ContextMigi-1.git","clone_url":"https://github.com/MrCrime/ContextMigi-1.git","svn_url":"https://github.com/MrCrime/ContextMigi-1","homepage":null,"size":56890,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/MrCrime/ContextMigi-1/pulls/66"},"html":{"href":"https://github.com/MrCrime/ContextMigi-1/pull/66"},"issue":{"href":"https://api.github.com/repos/MrCrime/ContextMigi-1/issues/66"},"comments":{"href":"https://api.github.com/repos/MrCrime/ContextMigi-1/issues/66/comments"},"review_comments":{"href":"https://api.github.com/repos/MrCrime/ContextMigi-1/pulls/66/comments"},"review_comment":{"href":"https://api.github.com/repos/MrCrime/ContextMigi-1/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/MrCrime/ContextMigi-1/pulls/66/commits"},"statuses":{"href":"https://api.github.com/repos/MrCrime/ContextMigi-1/statuses/9a3d8b13b4e12468c37cbdc09e53169eb5071d56"}}}}
{"actor":{"display_login":"marcelkuipers"}}