public void registerService(IGameService gameService) { services.Add(gameService); foreach (Entity entity in entities.Values) { gameService.registerEntityIfNeeded(entity); } }