示例#1
0
        /// <summary>
        /// Instantiate a Staff Manager
        /// </summary>
        public StaffManager()
        {
            Counter    = new ReadyCounter();
            Rankchiefs = new List <RankChief>();
            Servers    = new List <Server>();

            for (int i = 0; i < Global_Settings.nbRankChief; i++)
            {
                Rankchiefs.Add(new RankChief());
            }
            for (int i = 0; i < Global_Settings.nbServers; i++)
            {
                Servers.Add(new Server());
            }
            Master = new RoomMaster();

            StaffManager.Instance.Counter.socket.OrderReadyReception += this.OnOrderReadyToServe;
        }
        /// <summary>
        /// Instantiate a Staff Manager
        /// </summary>
        private StaffManager(List <Table> tables)
        {
            Counter = new ReadyCounter();

            Rankchiefs = new List <RankChief>();
            Servers    = new List <Server>();

            for (int i = 0; i < Global_Settings.nbRankChief; i++)
            {
                Rankchiefs.Add(new RankChief());
            }
            for (int i = 0; i < Global_Settings.nbServers; i++)
            {
                Servers.Add(new Server());
            }
            Master = new RoomMaster(tables);

            SocketCom.instance.OrderReadyReception += this.OnOrderReadyToServe;
        }