From 1f897d3f5ad11178cf4776ae4070c9d3e832f5f3 Mon Sep 17 00:00:00 2001 From: lonkaars Date: Sat, 27 Mar 2021 20:27:02 +0100 Subject: game/accept fix + stuk dir in voerbak --- api/game/accept.py | 2 +- voerbak/stuk/readme.md | 3 +++ voerbak/stuk/stuk | 1 + voerbak/stuk/stuk2 | 1 + 4 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 voerbak/stuk/readme.md create mode 100644 voerbak/stuk/stuk create mode 100644 voerbak/stuk/stuk2 diff --git a/api/game/accept.py b/api/game/accept.py index 36bc018..7aab697 100644 --- a/api/game/accept.py +++ b/api/game/accept.py @@ -14,7 +14,7 @@ join_game = Blueprint('game_accept', __name__) @join_game.route('/accept', methods = ['POST']) @auth_required("user") -def index(user_id): +def index(game_id): if cursor.execute("select status from games where game_id = ?", [game_id]).fetchone()[0] != "wait_for_opponent": return "", 403 diff --git a/voerbak/stuk/readme.md b/voerbak/stuk/readme.md new file mode 100644 index 0000000..67f48ad --- /dev/null +++ b/voerbak/stuk/readme.md @@ -0,0 +1,3 @@ +# Stuk + +These are games from the database that finished as won but they shouldn't've. These can be used as test cases for when I'll have enough motivation to write unit tests for voerbak. diff --git a/voerbak/stuk/stuk b/voerbak/stuk/stuk new file mode 100644 index 0000000..0c832dc --- /dev/null +++ b/voerbak/stuk/stuk @@ -0,0 +1 @@ +3,4,4,4,3,3,3,1,1,4,1,3,7,5,4,5,5,7,1,1,5,3,7,7,5,5,7,1,6,4,6,7,6,0 diff --git a/voerbak/stuk/stuk2 b/voerbak/stuk/stuk2 new file mode 100644 index 0000000..0fee69a --- /dev/null +++ b/voerbak/stuk/stuk2 @@ -0,0 +1 @@ +4,3,3,4,4,2,1,5,2,2,3,4,3,3,1,1,1,6,1,6,1,6,6,4,6,6,4,3,7,0 -- cgit v1.2.3