private void SetModule(IGameModule module) { m_CurrentModule = module; m_CurrentModule.ModuleCompleted += delegate(object sender, SuccessEventArg arg) { if (arg.Success) { AdvanceToNextGameState(); } else { SetModule(new EndGameModule(Observer, Table)); } }; m_CurrentModule.ModuleGenerated += (sender, arg) => m_Modules.Enqueue(arg.Module); m_CurrentModule.InitModule(); }
private void SetModule(IGameModule module) { m_CurrentModule = module; m_CurrentModule.ModuleCompleted += delegate(object sender, SuccessEventArg arg) { if (arg.Success) { AdvanceToNextGameState(); } else { SetModule(new EndGameModule(Observer,Table)); } }; m_CurrentModule.ModuleGenerated += (sender, arg) => m_Modules.Enqueue(arg.Module); m_CurrentModule.InitModule(); }