HelloWorld.GameHost.Initialize C# (CSharp) Method

Initialize() public static method

public static Initialize ( GameRulesBase rules, IGameDataService dataService, IGameMessageService messageService ) : void
rules GameRulesBase
dataService IGameDataService
messageService IGameMessageService
return void
        public static void Initialize( GameRulesBase rules, IGameDataService dataService, IGameMessageService messageService )
        {
            if ( rules == null )
            throw new ArgumentNullException( "rules" );

              if ( dataService == null )
            throw new ArgumentNullException( "dataService" );

              if ( messageService == null )
            throw new ArgumentNullException( "messageService" );

              GameRules = rules;
              DataService = dataService;
              MessageService = messageService;

              rules.Initialize();
              DataService.Initialize();
        }