From d4602283ebaaf28903c247d28bace84459c392ac Mon Sep 17 00:00:00 2001 From: Doveliyuchen Date: Tue, 4 Apr 2023 09:27:51 +0800 Subject: [PATCH 1/3] Update Update server data recieve --- .idea/.name | 1 + .idea/MarioWeb.iml | 2 +- .idea/misc.xml | 2 +- main.py | 18 ++++++++++++------ templates/GameOver.html | 37 ++++++++++++++++++++++++++++++++----- 5 files changed, 47 insertions(+), 13 deletions(-) create mode 100644 .idea/.name diff --git a/.idea/.name b/.idea/.name new file mode 100644 index 0000000..11a5d8e --- /dev/null +++ b/.idea/.name @@ -0,0 +1 @@ +main.py \ No newline at end of file diff --git a/.idea/MarioWeb.iml b/.idea/MarioWeb.iml index 37901ac..4f8673c 100644 --- a/.idea/MarioWeb.iml +++ b/.idea/MarioWeb.iml @@ -5,7 +5,7 @@ - + diff --git a/.idea/misc.xml b/.idea/misc.xml index d56657a..81644ce 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,4 +1,4 @@ - + \ No newline at end of file diff --git a/main.py b/main.py index 80095c7..8f5a5c9 100644 --- a/main.py +++ b/main.py @@ -193,21 +193,27 @@ def gameannoresult2(id): return redirect(url_for("gameplay2", id=id)) -@app.route("/gameover") +@app.route("/gameover",methods=['POST','GET']) def over(): finish = idm.getTimes(getId()) - return render_template("GameOver.html", finish=1, stage=1) - - -@app.route("/gameover//feedback", methods=['POST']) -def overa(): if request.method == 'POST': resultList = list(request.form)[0].split(",") idm.write_csv(feedbackPath, [getId(), resultList[0], ""]) + return render_template("GameOver.html", finish=1, stage=1) + +# @app.route('/feedback', methods=['POST']) +# def overa(): +# if request.method == 'POST': +# resultList = list(request.form)[0].split(",") +# idm.write_csv(feedbackPath, +# [getId(), resultList[0], +# ""]) + + # return redirect(url_for("over", id=id)) def saveFile(path, filename, content): cp = list(map(int, content)) file_dir = os.path.join(os.getcwd(), path) diff --git a/templates/GameOver.html b/templates/GameOver.html index dce88b2..187ed60 100644 --- a/templates/GameOver.html +++ b/templates/GameOver.html @@ -3,7 +3,7 @@ - + @@ -189,9 +189,10 @@

-

Do you have any feedback?

+ +
+

Do you have any feedback?


-

- +
@@ -250,7 +277,7 @@ - + From 5fca4056074271483f6ef03867196c7802ab3f40 Mon Sep 17 00:00:00 2001 From: Doveliyuchen Date: Tue, 4 Apr 2023 09:44:36 +0800 Subject: [PATCH 2/3] Update GameWelcome.html --- templates/GameWelcome.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/templates/GameWelcome.html b/templates/GameWelcome.html index 53fe4ea..2857ff2 100644 --- a/templates/GameWelcome.html +++ b/templates/GameWelcome.html @@ -289,6 +289,10 @@ +
This page is created by Haocheng Du, Yuchen Li; game content is generated by Ziqi Wang. This project is supported by Dr. Liu and Prof. Yannakakis.
+ +

+