{"action":"closed","issue":{"url":"https://api.github.com/repos/cswinter/CodeCraftGame/issues/10","repository_url":"https://api.github.com/repos/cswinter/CodeCraftGame","labels_url":"https://api.github.com/repos/cswinter/CodeCraftGame/issues/10/labels{/name}","comments_url":"https://api.github.com/repos/cswinter/CodeCraftGame/issues/10/comments","events_url":"https://api.github.com/repos/cswinter/CodeCraftGame/issues/10/events","html_url":"https://github.com/cswinter/CodeCraftGame/issues/10","id":308378917,"number":10,"title":"Single player games never call terminate() or send out GameClosed events","user":{"login":"magneticflux-","id":9124288,"avatar_url":"https://avatars1.githubusercontent.com/u/9124288?v=4","gravatar_id":"","url":"https://api.github.com/users/magneticflux-","html_url":"https://github.com/magneticflux-","followers_url":"https://api.github.com/users/magneticflux-/followers","following_url":"https://api.github.com/users/magneticflux-/following{/other_user}","gists_url":"https://api.github.com/users/magneticflux-/gists{/gist_id}","starred_url":"https://api.github.com/users/magneticflux-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magneticflux-/subscriptions","organizations_url":"https://api.github.com/users/magneticflux-/orgs","repos_url":"https://api.github.com/users/magneticflux-/repos","events_url":"https://api.github.com/users/magneticflux-/events{/privacy}","received_events_url":"https://api.github.com/users/magneticflux-/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-03-25T19:42:30Z","updated_at":"2018-03-25T20:50:39Z","closed_at":"2018-03-25T20:50:39Z","author_association":"NONE","body":"This prevents detection of ended singleplayer games that are running headless.\r\n\r\nCode that works:\r\n```\r\n    val controllers = Seq(TheGameMaster.level4AI(), TheGameMaster.level4AI())\r\n    val simulator = new DroneWorldSimulator(TheGameMaster.defaultMap.createGameConfig(controllers))\r\n\r\n    simulator.graphicsEnabled = false\r\n    simulator.framerateTarget = 1001\r\n    simulator.run(10000)\r\n    println(simulator.winner)\r\n```\r\n\r\nCode that doesn't work, but should:\r\n```\r\n    val controllers = Seq(TheGameMaster.level4AI(), TheGameMaster.level4AI())\r\n    val simulator = new DroneWorldSimulator(TheGameMaster.defaultMap.createGameConfig(controllers))\r\n\r\n    simulator.graphicsEnabled = false\r\n    simulator.framerateTarget = 1001\r\n    simulator.run(Int.MaxValue)\r\n    println(simulator.winner)\r\n```\r\n(Technically it would work, but running all `Int.MaxValue` iterations would take a while."}}
{"actor":{"display_login":"cswinter"}}