67 lines
2.1 KiB
HTML
67 lines
2.1 KiB
HTML
|
<!-- HTML for game.html -->
|
||
|
<!DOCTYPE html>
|
||
|
<html>
|
||
|
<head>
|
||
|
<title>Game</title>
|
||
|
</head>
|
||
|
<body>
|
||
|
<h1>Game</h1>
|
||
|
<p>Game ID: {{ game_id }}</p>
|
||
|
<p>gamestate: {{ gamestate }}</p>
|
||
|
|
||
|
<p>Number of Players: {{ gamestate.n_players }}</p>
|
||
|
<p>Current Player: {{ gamestate.current_player }}</p>
|
||
|
<p>Starting Player: {{ gamestate.starting_player }}</p>
|
||
|
<p>Player Names: {{ gamestate.player_names }}</p>
|
||
|
<p>Game End: {{ gamestate.game_end }}</p>
|
||
|
<p>Rounds: {{ gamestate.rounds }}</p>
|
||
|
<p>Days: {{ gamestate.days }}</p>
|
||
|
|
||
|
|
||
|
<h2>Market</h2>
|
||
|
{% for color, number in gamestate.market.items() %}
|
||
|
<p>{{ color }}: {{ number }}</p>
|
||
|
{% endfor %}
|
||
|
|
||
|
<h1>Factories</h1>
|
||
|
{% for factory in gamestate.factories %}
|
||
|
<h2>factory nr: {{ loop.index }}</h2>
|
||
|
{% for color, number in factory.items() %}
|
||
|
<p>{{ color }}: {{ number }}</p>
|
||
|
{% endfor %}
|
||
|
{% endfor %}
|
||
|
<h1>Players:</h1>
|
||
|
|
||
|
{% for name, player_data in gamestate.players.items() %}
|
||
|
{% if player_name == name %}
|
||
|
<h2>{{ player_name }} (You)</h2>
|
||
|
{% else %}
|
||
|
<h2>{{ name }}</h2>
|
||
|
{% endif %}
|
||
|
<p>Ready: {{ player_data.ready }}</p>
|
||
|
<p>Points: {{ player_data.points }}</p>
|
||
|
<h3>Pattern Lines</h3>
|
||
|
{% for line in player_data.pattern_lines %}
|
||
|
<p>Color: {{ line.color }}, Number: {{ line.number }}</p>
|
||
|
{% endfor %}
|
||
|
<h3>Wall</h3>
|
||
|
{% for row in player_data.wall %}
|
||
|
<p>{{ row }}</p>
|
||
|
{% endfor %}
|
||
|
<h3>Floor</h3>
|
||
|
{% for color, number in player_data.floor.items() %}
|
||
|
<p>{{ color }}: {{ number }}</p>
|
||
|
{% endfor %}
|
||
|
{% endfor %}
|
||
|
|
||
|
|
||
|
{% if player_name %}
|
||
|
<h1>Play area</h1>
|
||
|
<p>Playing as: {{ player_name }}</p>
|
||
|
<!-- form for submitting a move -->
|
||
|
<!-- <form method="POST" action="/game/{{ game_id }}/player/{{ player_name }}">
|
||
|
<input type="text" name="move" placeholder="Move" required>
|
||
|
<input type="submit" value="Submit Move"> -->
|
||
|
{% endif %}
|
||
|
</body>
|
||
|
</html>
|