{"action":"created","comment":{"url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/pulls/comments/62861971","id":62861971,"diff_hunk":"@@ -1,49 +1,59 @@\n #include \"mundo.h\"\n #include <stdio.h>\n #include \"celula_int.h\"\n+#include <stdbool.h>\n+typedef enum {FALSO, CIERTO} BOOL;\n struct mundo\n {\n-\t//Tamaño del mundo\n-\tint tamanyoX;\n-\tint tamanyoY;\n-\tchar tipo_mundo;\n-\tstruct celula *conjunto_celulas[2];\n+\tint tamanyoX;\t\t\t\t//Ancho del mundo\n+\tint tamanyoY;\t\t\t\t//Alto del mundo\n+\tchar tipo_mundo;\t\t\t//0->mundo cerrado ; 1->mundo toroidal\n+\tstruct celula *conjunto_celulas[2];\t//matrices de celulas\n+\tbool mundo_actual;\n };\n //Reserva memoria para un mundo y un array de células\n struct mundo *mundo_alloc(int tamX, int tamY, char tipo_mundo)\n {\n \tstruct mundo *m;\n+\tstruct celula *c0, *c1;\n \tm = (struct mundo *)malloc(sizeof(struct mundo));\n-\tm-> tamanyoX = tamX;\n-\tm-> tamanyoY = tamY;\n-\tm-> tipo_mundo = tipo_mundo;\n-\tstruct celula *c;\n-\tc = (struct celula *)calloc(tamX*tamY,sizeof(struct celula));\n-\tm-> conjunto_celulas[0] = c;\n-\tc = (struct celula *)calloc(tamX*tamY,sizeof(struct celula));\n-\tm-> conjunto_celulas[1] = c;\n-\treturn m;\n+\tc0 = (struct celula *)calloc(tamX*tamY,sizeof(struct celula));\n+\tc1 = (struct celula *)calloc(tamX*tamY,sizeof(struct celula));\n+\tif (!m || !c0 || !c1) {\n+\t\tprintf(\"No se pudo reservar memoria\\n\");\n+\t\treturn NULL;\n+\t} else {","path":"mundo.c","position":56,"original_position":39,"commit_id":"286e25b539e58effb84f243c6ad2bba5fa6911fc","original_commit_id":"286e25b539e58effb84f243c6ad2bba5fa6911fc","user":{"login":"profedotc","id":18260270,"avatar_url":"https://avatars.githubusercontent.com/u/18260270?v=3","gravatar_id":"","url":"https://api.github.com/users/profedotc","html_url":"https://github.com/profedotc","followers_url":"https://api.github.com/users/profedotc/followers","following_url":"https://api.github.com/users/profedotc/following{/other_user}","gists_url":"https://api.github.com/users/profedotc/gists{/gist_id}","starred_url":"https://api.github.com/users/profedotc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/profedotc/subscriptions","organizations_url":"https://api.github.com/users/profedotc/orgs","repos_url":"https://api.github.com/users/profedotc/repos","events_url":"https://api.github.com/users/profedotc/events{/privacy}","received_events_url":"https://api.github.com/users/profedotc/received_events","type":"User","site_admin":false},"body":"No necesitas poner el `else`. Si ejecutas `return` sale de la función, todo lo que esté debajo es un \"else\".\r\nNormalmente, si no hace falta no se pone, así toodo el código que tienes en este bloque no tiene por qué estar indentado","created_at":"2016-05-11T14:47:43Z","updated_at":"2016-05-11T14:47:43Z","html_url":"https://github.com/profedotc/cursoc-Damian-juegoVida/pull/1#discussion_r62861971","pull_request_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/pulls/comments/62861971"},"html":{"href":"https://github.com/profedotc/cursoc-Damian-juegoVida/pull/1#discussion_r62861971"},"pull_request":{"href":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/pulls/1","id":67031226,"html_url":"https://github.com/profedotc/cursoc-Damian-juegoVida/pull/1","diff_url":"https://github.com/profedotc/cursoc-Damian-juegoVida/pull/1.diff","patch_url":"https://github.com/profedotc/cursoc-Damian-juegoVida/pull/1.patch","issue_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/issues/1","number":1,"state":"open","locked":false,"title":"Correccion 1º Entrega","user":{"login":"DemianRV","id":17956248,"avatar_url":"https://avatars.githubusercontent.com/u/17956248?v=3","gravatar_id":"","url":"https://api.github.com/users/DemianRV","html_url":"https://github.com/DemianRV","followers_url":"https://api.github.com/users/DemianRV/followers","following_url":"https://api.github.com/users/DemianRV/following{/other_user}","gists_url":"https://api.github.com/users/DemianRV/gists{/gist_id}","starred_url":"https://api.github.com/users/DemianRV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DemianRV/subscriptions","organizations_url":"https://api.github.com/users/DemianRV/orgs","repos_url":"https://api.github.com/users/DemianRV/repos","events_url":"https://api.github.com/users/DemianRV/events{/privacy}","received_events_url":"https://api.github.com/users/DemianRV/received_events","type":"User","site_admin":false},"body":"Se ha corregido Coding style\r\nCambiado coordenadas X e Y por tamanyo X e Y","created_at":"2016-04-19T14:44:43Z","updated_at":"2016-05-11T14:47:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"cf93ccafc30672c2cdaa81b3f0b8043befe91662","assignee":{"login":"profedotc","id":18260270,"avatar_url":"https://avatars.githubusercontent.com/u/18260270?v=3","gravatar_id":"","url":"https://api.github.com/users/profedotc","html_url":"https://github.com/profedotc","followers_url":"https://api.github.com/users/profedotc/followers","following_url":"https://api.github.com/users/profedotc/following{/other_user}","gists_url":"https://api.github.com/users/profedotc/gists{/gist_id}","starred_url":"https://api.github.com/users/profedotc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/profedotc/subscriptions","organizations_url":"https://api.github.com/users/profedotc/orgs","repos_url":"https://api.github.com/users/profedotc/repos","events_url":"https://api.github.com/users/profedotc/events{/privacy}","received_events_url":"https://api.github.com/users/profedotc/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/pulls/1/commits","review_comments_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/pulls/1/comments","review_comment_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/pulls/comments{/number}","comments_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/issues/1/comments","statuses_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/statuses/286e25b539e58effb84f243c6ad2bba5fa6911fc","head":{"label":"DemianRV:master","ref":"master","sha":"286e25b539e58effb84f243c6ad2bba5fa6911fc","user":{"login":"DemianRV","id":17956248,"avatar_url":"https://avatars.githubusercontent.com/u/17956248?v=3","gravatar_id":"","url":"https://api.github.com/users/DemianRV","html_url":"https://github.com/DemianRV","followers_url":"https://api.github.com/users/DemianRV/followers","following_url":"https://api.github.com/users/DemianRV/following{/other_user}","gists_url":"https://api.github.com/users/DemianRV/gists{/gist_id}","starred_url":"https://api.github.com/users/DemianRV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DemianRV/subscriptions","organizations_url":"https://api.github.com/users/DemianRV/orgs","repos_url":"https://api.github.com/users/DemianRV/repos","events_url":"https://api.github.com/users/DemianRV/events{/privacy}","received_events_url":"https://api.github.com/users/DemianRV/received_events","type":"User","site_admin":false},"repo":{"id":55784662,"name":"cursoc-Damian-juegoVida","full_name":"DemianRV/cursoc-Damian-juegoVida","owner":{"login":"DemianRV","id":17956248,"avatar_url":"https://avatars.githubusercontent.com/u/17956248?v=3","gravatar_id":"","url":"https://api.github.com/users/DemianRV","html_url":"https://github.com/DemianRV","followers_url":"https://api.github.com/users/DemianRV/followers","following_url":"https://api.github.com/users/DemianRV/following{/other_user}","gists_url":"https://api.github.com/users/DemianRV/gists{/gist_id}","starred_url":"https://api.github.com/users/DemianRV/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DemianRV/subscriptions","organizations_url":"https://api.github.com/users/DemianRV/orgs","repos_url":"https://api.github.com/users/DemianRV/repos","events_url":"https://api.github.com/users/DemianRV/events{/privacy}","received_events_url":"https://api.github.com/users/DemianRV/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/DemianRV/cursoc-Damian-juegoVida","description":"","fork":false,"url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida","forks_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/forks","keys_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/keys{/key_id}","collaborators_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/teams","hooks_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/hooks","issue_events_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/issues/events{/number}","events_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/events","assignees_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/assignees{/user}","branches_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/branches{/branch}","tags_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/tags","blobs_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/git/refs{/sha}","trees_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/git/trees{/sha}","statuses_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/statuses/{sha}","languages_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/languages","stargazers_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/stargazers","contributors_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/contributors","subscribers_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/subscribers","subscription_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/subscription","commits_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/commits{/sha}","git_commits_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/git/commits{/sha}","comments_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/comments{/number}","issue_comment_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/issues/comments{/number}","contents_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/contents/{+path}","compare_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/compare/{base}...{head}","merges_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/merges","archive_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/downloads","issues_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/issues{/number}","pulls_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/pulls{/number}","milestones_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/milestones{/number}","notifications_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/labels{/name}","releases_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/releases{/id}","deployments_url":"https://api.github.com/repos/DemianRV/cursoc-Damian-juegoVida/deployments","created_at":"2016-04-08T14:22:49Z","updated_at":"2016-04-08T14:35:07Z","pushed_at":"2016-05-10T17:43:48Z","git_url":"git://github.com/DemianRV/cursoc-Damian-juegoVida.git","ssh_url":"git@github.com:DemianRV/cursoc-Damian-juegoVida.git","clone_url":"https://github.com/DemianRV/cursoc-Damian-juegoVida.git","svn_url":"https://github.com/DemianRV/cursoc-Damian-juegoVida","homepage":null,"size":26,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":0,"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"profedotc:master","ref":"master","sha":"1a7445cdcc69b74e0bffde2ef3a97c95c6da60bd","user":{"login":"profedotc","id":18260270,"avatar_url":"https://avatars.githubusercontent.com/u/18260270?v=3","gravatar_id":"","url":"https://api.github.com/users/profedotc","html_url":"https://github.com/profedotc","followers_url":"https://api.github.com/users/profedotc/followers","following_url":"https://api.github.com/users/profedotc/following{/other_user}","gists_url":"https://api.github.com/users/profedotc/gists{/gist_id}","starred_url":"https://api.github.com/users/profedotc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/profedotc/subscriptions","organizations_url":"https://api.github.com/users/profedotc/orgs","repos_url":"https://api.github.com/users/profedotc/repos","events_url":"https://api.github.com/users/profedotc/events{/privacy}","received_events_url":"https://api.github.com/users/profedotc/received_events","type":"User","site_admin":false},"repo":{"id":55835484,"name":"cursoc-Damian-juegoVida","full_name":"profedotc/cursoc-Damian-juegoVida","owner":{"login":"profedotc","id":18260270,"avatar_url":"https://avatars.githubusercontent.com/u/18260270?v=3","gravatar_id":"","url":"https://api.github.com/users/profedotc","html_url":"https://github.com/profedotc","followers_url":"https://api.github.com/users/profedotc/followers","following_url":"https://api.github.com/users/profedotc/following{/other_user}","gists_url":"https://api.github.com/users/profedotc/gists{/gist_id}","starred_url":"https://api.github.com/users/profedotc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/profedotc/subscriptions","organizations_url":"https://api.github.com/users/profedotc/orgs","repos_url":"https://api.github.com/users/profedotc/repos","events_url":"https://api.github.com/users/profedotc/events{/privacy}","received_events_url":"https://api.github.com/users/profedotc/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/profedotc/cursoc-Damian-juegoVida","description":"","fork":true,"url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida","forks_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/forks","keys_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/keys{/key_id}","collaborators_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/teams","hooks_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/hooks","issue_events_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/issues/events{/number}","events_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/events","assignees_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/assignees{/user}","branches_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/branches{/branch}","tags_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/tags","blobs_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/git/refs{/sha}","trees_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/git/trees{/sha}","statuses_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/statuses/{sha}","languages_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/languages","stargazers_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/stargazers","contributors_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/contributors","subscribers_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/subscribers","subscription_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/subscription","commits_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/commits{/sha}","git_commits_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/git/commits{/sha}","comments_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/comments{/number}","issue_comment_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/issues/comments{/number}","contents_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/contents/{+path}","compare_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/compare/{base}...{head}","merges_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/merges","archive_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/downloads","issues_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/issues{/number}","pulls_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/pulls{/number}","milestones_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/milestones{/number}","notifications_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/labels{/name}","releases_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/releases{/id}","deployments_url":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/deployments","created_at":"2016-04-09T09:11:40Z","updated_at":"2016-04-09T09:11:42Z","pushed_at":"2016-05-10T17:43:48Z","git_url":"git://github.com/profedotc/cursoc-Damian-juegoVida.git","ssh_url":"git@github.com:profedotc/cursoc-Damian-juegoVida.git","clone_url":"https://github.com/profedotc/cursoc-Damian-juegoVida.git","svn_url":"https://github.com/profedotc/cursoc-Damian-juegoVida","homepage":null,"size":2,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/pulls/1"},"html":{"href":"https://github.com/profedotc/cursoc-Damian-juegoVida/pull/1"},"issue":{"href":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/issues/1"},"comments":{"href":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/profedotc/cursoc-Damian-juegoVida/statuses/286e25b539e58effb84f243c6ad2bba5fa6911fc"}}}}