コード例 #1
0
ファイル: CodeController.cs プロジェクト: GLAVAK/AIGame
        public bool SubmitConsoleCommand(SubmitCodeModel submitCodeModel)
        {
            User currentUser = helper.GetCurrentUser(HttpContext.Current.Session["UserId"]);
            if (currentUser == null) return false;

            currentUser.consoleCommand += submitCodeModel.Code.Replace("%2B", "+") + "\n";

            return true;
        }
コード例 #2
0
ファイル: CodeController.cs プロジェクト: GLAVAK/AIGame
        public bool Submit(SubmitCodeModel submitCodeModel)
        {
            User currentUser = helper.GetCurrentUser(HttpContext.Current.Session["UserId"]);
            if (currentUser == null) return false;

            currentUser.Code = submitCodeModel.Code.Replace("%2B", "+");
            context.SaveChanges();

            return true;
        }