예제 #1
0
        public void Run()
        {
            _user    = DoLogin();
            _session = new UserSession(_user, new WikipediaTextGeneratorWithLocalCache());

            RunGameLoop();
        }
        public HttpResponseMessage GetNewSession(JWTToken token)
        {
            var user = new KCUser()
            {
                UserId = Guid.Parse(token.UserId)
            };
            var session    = new KeyCdr.UserSession(user).StartNewSession();
            var newSession = new SessionModel()
            {
                SessionId = session.SessionId,
                UserId    = session.UserId,
            };

            return(Request.CreateResponse(HttpStatusCode.OK, newSession));
        }