wake up the AI on round API fetch - fixes #196

This commit is contained in:
Thibault Duplessis 2015-01-05 15:02:05 +01:00
parent 0f9b153fe5
commit 1fc7224aa7

View file

@ -64,7 +64,10 @@ object Round extends LilaController with TheftPrevention {
Redirect(routes.Setup.await(fullId)).fuccess
)
},
api = apiVersion => Env.api.roundApi.player(pov, apiVersion, Nil) map { Ok(_) }
api = apiVersion => {
if (pov.game.playableByAi) env.roundMap ! Tell(pov.game.id, AiPlay)
Env.api.roundApi.player(pov, apiVersion, Nil) map { Ok(_) }
}
)
}
}