diff --git a/src/main.py b/src/main.py index f27ad3d..7030c1b 100755 --- a/src/main.py +++ b/src/main.py @@ -160,6 +160,11 @@ def game(game_id, player_name, local_game=None): else: return 'Player not found', 404 +@app.route('/gametitle/', methods=['GET']) +def gametitle(game_id): + gamestate = requests.get(ozai_url + 'game/' + game_id).json() + return render_template('gametitle.html', game_id=game_id, gamestate=gamestate) + @socketio.on('connect') def ws_connect(message): diff --git a/src/templates/game.html b/src/templates/game.html index 2f32647..5f9d951 100644 --- a/src/templates/game.html +++ b/src/templates/game.html @@ -236,7 +236,7 @@ {% for color, number in gamestate.market.items() %} {% if number > 0 %} {% for i in range(0, number) %} -
{{ color[:1] }}
+
{{ color[:1] }}
{% endfor %} {% endif %} {% endfor %} @@ -250,7 +250,7 @@ {% for color, number in factory.items() %} {% if number > 0 %} {% for i in range(0, number) %} -
{{ color[:1] }}
+
{{ color[:1] }}
{% endfor %} {% endif %} {% endfor %} @@ -283,7 +283,7 @@
{% for line in player_data.pattern_lines %} -
+
{% for i in range(0, loop.index) %} {% if line.number > i %} @@ -313,7 +313,7 @@
-
+
{% set floor_count = 0 %} {% set floor_negative_values = [1,1,2,2,2,3,3] %} {% for color, number in player_data.floor.items() %} @@ -377,7 +377,7 @@
- +
{% endif %} @@ -409,11 +409,97 @@ diff --git a/src/templates/gametitle.html b/src/templates/gametitle.html new file mode 100644 index 0000000..da09bcf --- /dev/null +++ b/src/templates/gametitle.html @@ -0,0 +1,58 @@ + + + + Game Title + + + + +
+ + + + \ No newline at end of file