-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplay_game.html
More file actions
39 lines (36 loc) · 1.14 KB
/
play_game.html
File metadata and controls
39 lines (36 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Juego TA-TE-TI</title>
</head>
<body>
<h1>Juego TA-TE-TI</h1>
<h2>Estado de la partida</h2>
{% if winner %}
<p><strong>¡El jugador {{ winner }} ha ganado!</strong></p>
{% else %}
<p>La partida sigue en curso.</p>
{% endif %}
<h3>Tablero:</h3>
<div style="display: grid; grid-template-columns: repeat(3, 100px); gap: 10px;">
{% for i in 0|range:9 %}
<div style="width: 100px; height: 100px; border: 1px solid #000; text-align: center; line-height: 100px;">
{% with game.moves|get_item:i as move %}
{% if move %}
{{ move }}
{% endif %}
{% endwith %}
</div>
{% endfor %}
</div>
<h3>Registrar Movimiento</h3>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit">Realizar Movimiento</button>
</form>
<a href="{% url 'create_game' %}">Nueva Partida</a>
</body>
</html>