{"action":"created","comment":{"url":"https://api.github.com/repos/RemireMontjoly/ocp3/pulls/comments/212040028","pull_request_review_id":148588047,"id":212040028,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIxMjA0MDAyOA==","diff_hunk":"@@ -16,14 +16,74 @@ class Team {\n         self.name = name\n         self.characters = characters\n     }\n+    //////////////////////////////////////////Fonction qui donne les info sur les membres de l'équipe\n     func teamInfo() {\n         print(\"L'équipe \\(self.name) est composée de :\")\n-        for character in characters{\n+        for character in characters {\n             print (\"- \\(character.name) de type \\(character.type) avec une vie à : \\(character.life)\")\n         }\n     }\n+    //////////////////////////////////////////Fonction qui permet de choisir avec quel personnage on attaque (En bouclant si le choix est un personnage mort)\n+    func chooseAttacker() -> Character {\n+        print(\"Equipe \\(self.name) veuillez choisir un de vos personnages pour passer à l'action (de 1 à 3)\")\n+        miniInfo()\n+        if let choice = Int(readLine()!) {\n+            if self.characters[choice - 1].life == 0 {\n+                print(\"Ce personnage est mort.Veuillez en choisir un autre.\")\n+                return chooseAttacker()\n+            } else {\n+                switch choice {\n+                case 1: return self.characters[0]\n+                case 2: return self.characters[1]\n+                case 3: return self.characters[2]\n+                default: print(\"Veuillez choisir entre 1 et 3\")\n+                }\n+            }\n+        }\n+        return chooseAttacker()\n+    }\n+    ///////////////////////////////////////////Fonction qui permet de choisir quel personnage on va attaquer (En bouclant si le choix est un personnage mort)\n+    func chooseTarget() -> Character {\n+        print(\"Veuillez choisir quel personnage attaquer (de 1 à 3)\")\n+        miniInfo()\n+        if let choice = Int(readLine()!) {\n+            if self.characters[choice - 1].life == 0 {\n+                print(\"Ce personnage est mort.Veuillez en choisir un autre.\")\n+                return chooseTarget()\n+            } else {\n+                switch choice {\n+                case 1: return self.characters[0]\n+                case 2: return self.characters[1]\n+                case 3: return self.characters[2]\n+                default: print(\"Veuillez choisir entre 1 et 3\")\n+                }\n+            }\n+        }\n+        return chooseTarget()\n+    }\n+    \n+    \n+    ///////////////////////////////////Fonction qui permet de savoir quelle equipe n'a plus de personnage en vie\n+    func alive(team: Team) -> Bool {\n+        if characters[0].life == 0 && characters[1].life == 0 && characters[2].life == 0 {\n+            return true\n+        } else {\n+            return false\n+        }\n+    }\n+    \n+    \n+    \n+    /////////////////////////////Fonction pour rappeler quels sont les noms des membre\n+    func miniInfo() {","path":"ocp3/ocp3/Team.swift","position":64,"original_position":64,"commit_id":"7dd8383c7fd615efa52b0d614b18a646dcee6a03","original_commit_id":"7dd8383c7fd615efa52b0d614b18a646dcee6a03","user":{"login":"RemireMontjoly","id":38878937,"node_id":"MDQ6VXNlcjM4ODc4OTM3","avatar_url":"https://avatars0.githubusercontent.com/u/38878937?v=4","gravatar_id":"","url":"https://api.github.com/users/RemireMontjoly","html_url":"https://github.com/RemireMontjoly","followers_url":"https://api.github.com/users/RemireMontjoly/followers","following_url":"https://api.github.com/users/RemireMontjoly/following{/other_user}","gists_url":"https://api.github.com/users/RemireMontjoly/gists{/gist_id}","starred_url":"https://api.github.com/users/RemireMontjoly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RemireMontjoly/subscriptions","organizations_url":"https://api.github.com/users/RemireMontjoly/orgs","repos_url":"https://api.github.com/users/RemireMontjoly/repos","events_url":"https://api.github.com/users/RemireMontjoly/events{/privacy}","received_events_url":"https://api.github.com/users/RemireMontjoly/received_events","type":"User","site_admin":false},"body":"Outside of the class ? Do you mean? ","created_at":"2018-08-22T17:27:54Z","updated_at":"2018-08-22T17:27:54Z","html_url":"https://github.com/RemireMontjoly/ocp3/pull/1#discussion_r212040028","pull_request_url":"https://api.github.com/repos/RemireMontjoly/ocp3/pulls/1","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/RemireMontjoly/ocp3/pulls/comments/212040028"},"html":{"href":"https://github.com/RemireMontjoly/ocp3/pull/1#discussion_r212040028"},"pull_request":{"href":"https://api.github.com/repos/RemireMontjoly/ocp3/pulls/1"}},"in_reply_to_id":211704114},"pull_request":{"url":"https://api.github.com/repos/RemireMontjoly/ocp3/pulls/1","id":209904897,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA5OTA0ODk3","html_url":"https://github.com/RemireMontjoly/ocp3/pull/1","diff_url":"https://github.com/RemireMontjoly/ocp3/pull/1.diff","patch_url":"https://github.com/RemireMontjoly/ocp3/pull/1.patch","issue_url":"https://api.github.com/repos/RemireMontjoly/ocp3/issues/1","number":1,"state":"open","locked":false,"title":"Step2","user":{"login":"RemireMontjoly","id":38878937,"node_id":"MDQ6VXNlcjM4ODc4OTM3","avatar_url":"https://avatars0.githubusercontent.com/u/38878937?v=4","gravatar_id":"","url":"https://api.github.com/users/RemireMontjoly","html_url":"https://github.com/RemireMontjoly","followers_url":"https://api.github.com/users/RemireMontjoly/followers","following_url":"https://api.github.com/users/RemireMontjoly/following{/other_user}","gists_url":"https://api.github.com/users/RemireMontjoly/gists{/gist_id}","starred_url":"https://api.github.com/users/RemireMontjoly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RemireMontjoly/subscriptions","organizations_url":"https://api.github.com/users/RemireMontjoly/orgs","repos_url":"https://api.github.com/users/RemireMontjoly/repos","events_url":"https://api.github.com/users/RemireMontjoly/events{/privacy}","received_events_url":"https://api.github.com/users/RemireMontjoly/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-08-21T17:46:48Z","updated_at":"2018-08-22T17:27:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bcae5859d875de7c36cc81d2d5f0a37c45c03726","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/RemireMontjoly/ocp3/pulls/1/commits","review_comments_url":"https://api.github.com/repos/RemireMontjoly/ocp3/pulls/1/comments","review_comment_url":"https://api.github.com/repos/RemireMontjoly/ocp3/pulls/comments{/number}","comments_url":"https://api.github.com/repos/RemireMontjoly/ocp3/issues/1/comments","statuses_url":"https://api.github.com/repos/RemireMontjoly/ocp3/statuses/7dd8383c7fd615efa52b0d614b18a646dcee6a03","head":{"label":"RemireMontjoly:step2","ref":"step2","sha":"7dd8383c7fd615efa52b0d614b18a646dcee6a03","user":{"login":"RemireMontjoly","id":38878937,"node_id":"MDQ6VXNlcjM4ODc4OTM3","avatar_url":"https://avatars0.githubusercontent.com/u/38878937?v=4","gravatar_id":"","url":"https://api.github.com/users/RemireMontjoly","html_url":"https://github.com/RemireMontjoly","followers_url":"https://api.github.com/users/RemireMontjoly/followers","following_url":"https://api.github.com/users/RemireMontjoly/following{/other_user}","gists_url":"https://api.github.com/users/RemireMontjoly/gists{/gist_id}","starred_url":"https://api.github.com/users/RemireMontjoly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RemireMontjoly/subscriptions","organizations_url":"https://api.github.com/users/RemireMontjoly/orgs","repos_url":"https://api.github.com/users/RemireMontjoly/repos","events_url":"https://api.github.com/users/RemireMontjoly/events{/privacy}","received_events_url":"https://api.github.com/users/RemireMontjoly/received_events","type":"User","site_admin":false},"repo":{"id":141792486,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE3OTI0ODY=","name":"ocp3","full_name":"RemireMontjoly/ocp3","owner":{"login":"RemireMontjoly","id":38878937,"node_id":"MDQ6VXNlcjM4ODc4OTM3","avatar_url":"https://avatars0.githubusercontent.com/u/38878937?v=4","gravatar_id":"","url":"https://api.github.com/users/RemireMontjoly","html_url":"https://github.com/RemireMontjoly","followers_url":"https://api.github.com/users/RemireMontjoly/followers","following_url":"https://api.github.com/users/RemireMontjoly/following{/other_user}","gists_url":"https://api.github.com/users/RemireMontjoly/gists{/gist_id}","starred_url":"https://api.github.com/users/RemireMontjoly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RemireMontjoly/subscriptions","organizations_url":"https://api.github.com/users/RemireMontjoly/orgs","repos_url":"https://api.github.com/users/RemireMontjoly/repos","events_url":"https://api.github.com/users/RemireMontjoly/events{/privacy}","received_events_url":"https://api.github.com/users/RemireMontjoly/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RemireMontjoly/ocp3","description":null,"fork":false,"url":"https://api.github.com/repos/RemireMontjoly/ocp3","forks_url":"https://api.github.com/repos/RemireMontjoly/ocp3/forks","keys_url":"https://api.github.com/repos/RemireMontjoly/ocp3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RemireMontjoly/ocp3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RemireMontjoly/ocp3/teams","hooks_url":"https://api.github.com/repos/RemireMontjoly/ocp3/hooks","issue_events_url":"https://api.github.com/repos/RemireMontjoly/ocp3/issues/events{/number}","events_url":"https://api.github.com/repos/RemireMontjoly/ocp3/events","assignees_url":"https://api.github.com/repos/RemireMontjoly/ocp3/assignees{/user}","branches_url":"https://api.github.com/repos/RemireMontjoly/ocp3/branches{/branch}","tags_url":"https://api.github.com/repos/RemireMontjoly/ocp3/tags","blobs_url":"https://api.github.com/repos/RemireMontjoly/ocp3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RemireMontjoly/ocp3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RemireMontjoly/ocp3/git/refs{/sha}","trees_url":"https://api.github.com/repos/RemireMontjoly/ocp3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RemireMontjoly/ocp3/statuses/{sha}","languages_url":"https://api.github.com/repos/RemireMontjoly/ocp3/languages","stargazers_url":"https://api.github.com/repos/RemireMontjoly/ocp3/stargazers","contributors_url":"https://api.github.com/repos/RemireMontjoly/ocp3/contributors","subscribers_url":"https://api.github.com/repos/RemireMontjoly/ocp3/subscribers","subscription_url":"https://api.github.com/repos/RemireMontjoly/ocp3/subscription","commits_url":"https://api.github.com/repos/RemireMontjoly/ocp3/commits{/sha}","git_commits_url":"https://api.github.com/repos/RemireMontjoly/ocp3/git/commits{/sha}","comments_url":"https://api.github.com/repos/RemireMontjoly/ocp3/comments{/number}","issue_comment_url":"https://api.github.com/repos/RemireMontjoly/ocp3/issues/comments{/number}","contents_url":"https://api.github.com/repos/RemireMontjoly/ocp3/contents/{+path}","compare_url":"https://api.github.com/repos/RemireMontjoly/ocp3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RemireMontjoly/ocp3/merges","archive_url":"https://api.github.com/repos/RemireMontjoly/ocp3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RemireMontjoly/ocp3/downloads","issues_url":"https://api.github.com/repos/RemireMontjoly/ocp3/issues{/number}","pulls_url":"https://api.github.com/repos/RemireMontjoly/ocp3/pulls{/number}","milestones_url":"https://api.github.com/repos/RemireMontjoly/ocp3/milestones{/number}","notifications_url":"https://api.github.com/repos/RemireMontjoly/ocp3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RemireMontjoly/ocp3/labels{/name}","releases_url":"https://api.github.com/repos/RemireMontjoly/ocp3/releases{/id}","deployments_url":"https://api.github.com/repos/RemireMontjoly/ocp3/deployments","created_at":"2018-07-21T07:51:44Z","updated_at":"2018-08-12T17:02:07Z","pushed_at":"2018-08-21T17:46:48Z","git_url":"git://github.com/RemireMontjoly/ocp3.git","ssh_url":"git@github.com:RemireMontjoly/ocp3.git","clone_url":"https://github.com/RemireMontjoly/ocp3.git","svn_url":"https://github.com/RemireMontjoly/ocp3","homepage":null,"size":188,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"RemireMontjoly:master","ref":"master","sha":"6d620a688790a76852194b08d8562a7c30018a95","user":{"login":"RemireMontjoly","id":38878937,"node_id":"MDQ6VXNlcjM4ODc4OTM3","avatar_url":"https://avatars0.githubusercontent.com/u/38878937?v=4","gravatar_id":"","url":"https://api.github.com/users/RemireMontjoly","html_url":"https://github.com/RemireMontjoly","followers_url":"https://api.github.com/users/RemireMontjoly/followers","following_url":"https://api.github.com/users/RemireMontjoly/following{/other_user}","gists_url":"https://api.github.com/users/RemireMontjoly/gists{/gist_id}","starred_url":"https://api.github.com/users/RemireMontjoly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RemireMontjoly/subscriptions","organizations_url":"https://api.github.com/users/RemireMontjoly/orgs","repos_url":"https://api.github.com/users/RemireMontjoly/repos","events_url":"https://api.github.com/users/RemireMontjoly/events{/privacy}","received_events_url":"https://api.github.com/users/RemireMontjoly/received_events","type":"User","site_admin":false},"repo":{"id":141792486,"node_id":"MDEwOlJlcG9zaXRvcnkxNDE3OTI0ODY=","name":"ocp3","full_name":"RemireMontjoly/ocp3","owner":{"login":"RemireMontjoly","id":38878937,"node_id":"MDQ6VXNlcjM4ODc4OTM3","avatar_url":"https://avatars0.githubusercontent.com/u/38878937?v=4","gravatar_id":"","url":"https://api.github.com/users/RemireMontjoly","html_url":"https://github.com/RemireMontjoly","followers_url":"https://api.github.com/users/RemireMontjoly/followers","following_url":"https://api.github.com/users/RemireMontjoly/following{/other_user}","gists_url":"https://api.github.com/users/RemireMontjoly/gists{/gist_id}","starred_url":"https://api.github.com/users/RemireMontjoly/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RemireMontjoly/subscriptions","organizations_url":"https://api.github.com/users/RemireMontjoly/orgs","repos_url":"https://api.github.com/users/RemireMontjoly/repos","events_url":"https://api.github.com/users/RemireMontjoly/events{/privacy}","received_events_url":"https://api.github.com/users/RemireMontjoly/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/RemireMontjoly/ocp3","description":null,"fork":false,"url":"https://api.github.com/repos/RemireMontjoly/ocp3","forks_url":"https://api.github.com/repos/RemireMontjoly/ocp3/forks","keys_url":"https://api.github.com/repos/RemireMontjoly/ocp3/keys{/key_id}","collaborators_url":"https://api.github.com/repos/RemireMontjoly/ocp3/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/RemireMontjoly/ocp3/teams","hooks_url":"https://api.github.com/repos/RemireMontjoly/ocp3/hooks","issue_events_url":"https://api.github.com/repos/RemireMontjoly/ocp3/issues/events{/number}","events_url":"https://api.github.com/repos/RemireMontjoly/ocp3/events","assignees_url":"https://api.github.com/repos/RemireMontjoly/ocp3/assignees{/user}","branches_url":"https://api.github.com/repos/RemireMontjoly/ocp3/branches{/branch}","tags_url":"https://api.github.com/repos/RemireMontjoly/ocp3/tags","blobs_url":"https://api.github.com/repos/RemireMontjoly/ocp3/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/RemireMontjoly/ocp3/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/RemireMontjoly/ocp3/git/refs{/sha}","trees_url":"https://api.github.com/repos/RemireMontjoly/ocp3/git/trees{/sha}","statuses_url":"https://api.github.com/repos/RemireMontjoly/ocp3/statuses/{sha}","languages_url":"https://api.github.com/repos/RemireMontjoly/ocp3/languages","stargazers_url":"https://api.github.com/repos/RemireMontjoly/ocp3/stargazers","contributors_url":"https://api.github.com/repos/RemireMontjoly/ocp3/contributors","subscribers_url":"https://api.github.com/repos/RemireMontjoly/ocp3/subscribers","subscription_url":"https://api.github.com/repos/RemireMontjoly/ocp3/subscription","commits_url":"https://api.github.com/repos/RemireMontjoly/ocp3/commits{/sha}","git_commits_url":"https://api.github.com/repos/RemireMontjoly/ocp3/git/commits{/sha}","comments_url":"https://api.github.com/repos/RemireMontjoly/ocp3/comments{/number}","issue_comment_url":"https://api.github.com/repos/RemireMontjoly/ocp3/issues/comments{/number}","contents_url":"https://api.github.com/repos/RemireMontjoly/ocp3/contents/{+path}","compare_url":"https://api.github.com/repos/RemireMontjoly/ocp3/compare/{base}...{head}","merges_url":"https://api.github.com/repos/RemireMontjoly/ocp3/merges","archive_url":"https://api.github.com/repos/RemireMontjoly/ocp3/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/RemireMontjoly/ocp3/downloads","issues_url":"https://api.github.com/repos/RemireMontjoly/ocp3/issues{/number}","pulls_url":"https://api.github.com/repos/RemireMontjoly/ocp3/pulls{/number}","milestones_url":"https://api.github.com/repos/RemireMontjoly/ocp3/milestones{/number}","notifications_url":"https://api.github.com/repos/RemireMontjoly/ocp3/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/RemireMontjoly/ocp3/labels{/name}","releases_url":"https://api.github.com/repos/RemireMontjoly/ocp3/releases{/id}","deployments_url":"https://api.github.com/repos/RemireMontjoly/ocp3/deployments","created_at":"2018-07-21T07:51:44Z","updated_at":"2018-08-12T17:02:07Z","pushed_at":"2018-08-21T17:46:48Z","git_url":"git://github.com/RemireMontjoly/ocp3.git","ssh_url":"git@github.com:RemireMontjoly/ocp3.git","clone_url":"https://github.com/RemireMontjoly/ocp3.git","svn_url":"https://github.com/RemireMontjoly/ocp3","homepage":null,"size":188,"stargazers_count":0,"watchers_count":0,"language":"Swift","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/RemireMontjoly/ocp3/pulls/1"},"html":{"href":"https://github.com/RemireMontjoly/ocp3/pull/1"},"issue":{"href":"https://api.github.com/repos/RemireMontjoly/ocp3/issues/1"},"comments":{"href":"https://api.github.com/repos/RemireMontjoly/ocp3/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/RemireMontjoly/ocp3/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/RemireMontjoly/ocp3/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/RemireMontjoly/ocp3/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/RemireMontjoly/ocp3/statuses/7dd8383c7fd615efa52b0d614b18a646dcee6a03"}},"author_association":"OWNER"}}
{"actor":{"display_login":"RemireMontjoly"}}