{"action":"created","issue":{"url":"https://api.github.com/repos/eligantRU/eligant.ru/issues/39","repository_url":"https://api.github.com/repos/eligantRU/eligant.ru","labels_url":"https://api.github.com/repos/eligantRU/eligant.ru/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/eligantRU/eligant.ru/issues/39/comments","events_url":"https://api.github.com/repos/eligantRU/eligant.ru/issues/39/events","html_url":"https://github.com/eligantRU/eligant.ru/issues/39","id":124713722,"number":39,"title":"Абстрагирование сцены","user":{"login":"sergey-shambir","id":1856842,"avatar_url":"https://avatars.githubusercontent.com/u/1856842?v=3","gravatar_id":"","url":"https://api.github.com/users/sergey-shambir","html_url":"https://github.com/sergey-shambir","followers_url":"https://api.github.com/users/sergey-shambir/followers","following_url":"https://api.github.com/users/sergey-shambir/following{/other_user}","gists_url":"https://api.github.com/users/sergey-shambir/gists{/gist_id}","starred_url":"https://api.github.com/users/sergey-shambir/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sergey-shambir/subscriptions","organizations_url":"https://api.github.com/users/sergey-shambir/orgs","repos_url":"https://api.github.com/users/sergey-shambir/repos","events_url":"https://api.github.com/users/sergey-shambir/events{/privacy}","received_events_url":"https://api.github.com/users/sergey-shambir/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-04T08:15:22Z","updated_at":"2016-04-09T11:33:23Z","closed_at":"2016-04-09T11:33:23Z","body":"Сейчас игра имеет несколько разных сцен, каждая из которых имеет свой\r\n- внешний вид\r\n- данные\r\n- поведение\r\n\r\nКаждая сцена реализована как одна или несколько функций, каждая функция внутри крутит свой цикл событий SFML и дублирует код, но дублирует не полностью, что вызывает баги из разряда \"Не работает Alt+F4\".\r\n\r\nЦикл событий должен быть более универсальным. А для этого следует абстрагироваться от сцен.\r\n\r\nСперва выделим, какие сцены существуют в данный момент. Я вижу следующее:\r\n\r\n1. onPauseMenu\r\n2. onStartMenu\r\n3. onGameOverMenu\r\n4. enterGameLoop, gameLoop, update, resetGame, initAssets"},"comment":{"url":"https://api.github.com/repos/eligantRU/eligant.ru/issues/comments/207774047","html_url":"https://github.com/eligantRU/eligant.ru/issues/39#issuecomment-207774047","issue_url":"https://api.github.com/repos/eligantRU/eligant.ru/issues/39","id":207774047,"user":{"login":"eligantRU","id":9452661,"avatar_url":"https://avatars.githubusercontent.com/u/9452661?v=3","gravatar_id":"","url":"https://api.github.com/users/eligantRU","html_url":"https://github.com/eligantRU","followers_url":"https://api.github.com/users/eligantRU/followers","following_url":"https://api.github.com/users/eligantRU/following{/other_user}","gists_url":"https://api.github.com/users/eligantRU/gists{/gist_id}","starred_url":"https://api.github.com/users/eligantRU/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eligantRU/subscriptions","organizations_url":"https://api.github.com/users/eligantRU/orgs","repos_url":"https://api.github.com/users/eligantRU/repos","events_url":"https://api.github.com/users/eligantRU/events{/privacy}","received_events_url":"https://api.github.com/users/eligantRU/received_events","type":"User","site_admin":false},"created_at":"2016-04-09T11:33:23Z","updated_at":"2016-04-09T11:33:23Z","body":"Хотя есть определённые претензии, в целом -- сделано"}}