예제 #1
0
        //----------------------------------------------------------------

        public CGameServer()
        {
            this.room_manager            = new CGameRoomManager();
            this.room_manager2           = new CGameRoomManager();
            this.room_manager3           = new CGameRoomManager();
            this.matching_waiting_users  = new List <CGameUser>();
            this.matching_waiting_users2 = new List <CGameUser>();
        }
예제 #2
0
        public CGameRoom(CGameRoomManager room_manager)
        {
            this.room_manager      = room_manager;
            this.players           = new List <CPlayer>();
            this.received_protocol = new Dictionary <byte, PROTOCOL>();

            //this.state_manager = new CStateManager<CPlayer, CPacket>();
            //this.state_manager.add(STATE.READY, new CGameRoomReadyState(this));
            //this.state_manager.add(STATE.PLAY, new CGameRoomPlayState(this));
            //this.state_manager.change_state(STATE.READY);
            invite_room_check = new List <CPlayer>();

            this.room_states = new Dictionary <ROOM_STATE_TYPE, IRoomState>();
            this.room_states.Add(ROOM_STATE_TYPE.READY, new CGameRoomReadyState(this));
            this.room_states.Add(ROOM_STATE_TYPE.PLAY, new CGameRoomPlayState(this));
            change_state(ROOM_STATE_TYPE.READY);
        }