{"action":"created","issue":{"url":"https://api.github.com/repos/mlafroce/template-tp-grupal/issues/37","repository_url":"https://api.github.com/repos/mlafroce/template-tp-grupal","labels_url":"https://api.github.com/repos/mlafroce/template-tp-grupal/issues/37/labels{/name}","comments_url":"https://api.github.com/repos/mlafroce/template-tp-grupal/issues/37/comments","events_url":"https://api.github.com/repos/mlafroce/template-tp-grupal/issues/37/events","html_url":"https://github.com/mlafroce/template-tp-grupal/issues/37","id":156079998,"number":37,"title":"Analisis pedido Entrega 2","user":{"login":"agscontini","id":11981315,"avatar_url":"https://avatars.githubusercontent.com/u/11981315?v=3","gravatar_id":"","url":"https://api.github.com/users/agscontini","html_url":"https://github.com/agscontini","followers_url":"https://api.github.com/users/agscontini/followers","following_url":"https://api.github.com/users/agscontini/following{/other_user}","gists_url":"https://api.github.com/users/agscontini/gists{/gist_id}","starred_url":"https://api.github.com/users/agscontini/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/agscontini/subscriptions","organizations_url":"https://api.github.com/users/agscontini/orgs","repos_url":"https://api.github.com/users/agscontini/repos","events_url":"https://api.github.com/users/agscontini/events{/privacy}","received_events_url":"https://api.github.com/users/agscontini/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":{"login":"AyudantesTecnicas","id":17928142,"avatar_url":"https://avatars.githubusercontent.com/u/17928142?v=3","gravatar_id":"","url":"https://api.github.com/users/AyudantesTecnicas","html_url":"https://github.com/AyudantesTecnicas","followers_url":"https://api.github.com/users/AyudantesTecnicas/followers","following_url":"https://api.github.com/users/AyudantesTecnicas/following{/other_user}","gists_url":"https://api.github.com/users/AyudantesTecnicas/gists{/gist_id}","starred_url":"https://api.github.com/users/AyudantesTecnicas/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AyudantesTecnicas/subscriptions","organizations_url":"https://api.github.com/users/AyudantesTecnicas/orgs","repos_url":"https://api.github.com/users/AyudantesTecnicas/repos","events_url":"https://api.github.com/users/AyudantesTecnicas/events{/privacy}","received_events_url":"https://api.github.com/users/AyudantesTecnicas/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-05-21T02:51:35Z","updated_at":"2016-05-21T13:43:16Z","closed_at":"2016-05-21T02:52:11Z","body":"Paso del tiempo como pide la consigna para ambos casos."},"comment":{"url":"https://api.github.com/repos/mlafroce/template-tp-grupal/issues/comments/220778498","html_url":"https://github.com/mlafroce/template-tp-grupal/issues/37#issuecomment-220778498","issue_url":"https://api.github.com/repos/mlafroce/template-tp-grupal/issues/37","id":220778498,"user":{"login":"demianLopez","id":8108080,"avatar_url":"https://avatars.githubusercontent.com/u/8108080?v=3","gravatar_id":"","url":"https://api.github.com/users/demianLopez","html_url":"https://github.com/demianLopez","followers_url":"https://api.github.com/users/demianLopez/followers","following_url":"https://api.github.com/users/demianLopez/following{/other_user}","gists_url":"https://api.github.com/users/demianLopez/gists{/gist_id}","starred_url":"https://api.github.com/users/demianLopez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/demianLopez/subscriptions","organizations_url":"https://api.github.com/users/demianLopez/orgs","repos_url":"https://api.github.com/users/demianLopez/repos","events_url":"https://api.github.com/users/demianLopez/events{/privacy}","received_events_url":"https://api.github.com/users/demianLopez/received_events","type":"User","site_admin":false},"created_at":"2016-05-21T13:43:16Z","updated_at":"2016-05-21T13:43:16Z","body":"También se podría modelar el paso del tiempo como \"cantidad de acciones ejecutadas\", de ser así, suponiendo que cada acción ejecutada implica el paso de X unidades de tiempo, de ser ese el caso se puede realizar sin cambiar el modelo -> Basta crear tres states:\r\n```json\r\n{\r\n        \"name\": \"accionesTotales\",\r\n        \"value\": \"0\"\r\n    }, {\r\n        \"name\": \"accionesParaMorir\",\r\n        \"value\": \"0\"\r\n    }, {\r\n        \"name\":\"isPoison\",\r\n        \"value\":\"0\"\r\n}\r\n```\r\nTenes que crear 1 updateSet:\r\n```json\r\n{\r\n        \"executable\": false,\r\n        \"label\": \"updateTotalActions\",\r\n        \"update\": [{\r\n            \"type\": \"++\",\r\n            \"name\": \"object\",\r\n            \"value\": \"1\"\r\n        }\r\n```\r\ny un actionSet:\r\n```json\r\n{\r\n        \"executable\": false,\r\n        \"label\": \"CheckPoison\",\r\n        \"cases\": [{\r\n            \"do\": [{\r\n                \"conditions\": [{\r\n                    \"type\": \"greaterThanCondition\",\r\n                    \"name\": \"accionesParaMorir\",\r\n                    \"value\": \"accionesTotales\"\r\n                }, {\r\n                    \"type\": \"standarCondition\",\r\n                    \"name\": \"isPoison\",\r\n                    \"value\": \"1\"\r\n                }],\r\n            }]}],\r\n            \"actions\" : [\"kill\"]\r\n```\r\n\r\nEntonces cuando te envenenas tenes que setear el state \"isPoison\" a 1.\r\nEn \"accionesParaMorir\" = AccionesTotales + N (con N la cantidad de turnos hasta morir)\r\nEsto ultimo se puede hacer armando un update que primero le asigne a \"accionesParaMorir\" el valor de \"accionesTotales\" y luego le sume N.\r\n\r\nFinalmente para que esto funcione hay que llamar en TODAS LAS ACCIONES a \"updateTotalActions\" y \"checkPoison\".\r\n\r\nVentajas: No se debe modificar el programa:\r\nDesventajas: Tenes que llamar a \"updateTotalActions\" y a \"checkPoison\" en todas las acciones armadas, lo cual incrementa la complejidad del archivo de configuración considerablemente.\r\n\r\nOtra opción intermedia sería tener ya definida la variable global de tiempo internamente (tener un state que ya viene con el motor y es común a todos los juegos, que se pueda usar sin necesidad de ser definida) que lleve la cuenta del tiempo (acciones realizadas) y luego definir \"actions\" globales que se validen turno a turno (algo parecido a las winCondition), pero que a su vez estas puedan llamar a otras acciones (esto es para poder manejar todo tipo de eventos, no solo envenamiento).\r\n\r\nCLARO ESTA, QUE TODO ES VALIDO SUPONIENDO QUE EL TIEMPO AVANZA ACCIÓN A ACCION, lo cual tiene sentido por ser un motor de aventuras gráficas"}}
{"actor":{"display_login":"demianLopez"}}