示例#1
0
        public string Create(GameClient owner, int quizId, out Room room)
        {
            room          = new WaitingRoom();
            room.Parent   = Owner;
            room.IsInGame = false;
            room.AddOwner(owner);
            Quiz quiz = new Quiz();

            quiz.FromEntity(ServerMain.Instance.Database.GetQuiz(quizId));
            room.Quiz         = quiz;
            room.IsLocked     = false;
            room.NoOfQuestion = -1;
            Rooms.Add(room);
            Observer.OnRoomCreated(room.Parent, room.GetIdentifier());
            return(room.GetIdentifier());
        }