-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgame.html
133 lines (127 loc) · 4.09 KB
/
game.html
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
{% extends "base.html" %}
{% block css %}
<link href="/css/chess.css" type="text/css" rel="Stylesheet"/>
{% endblock %}
{% block script %}
<script type="text/javascript" src="/javascript/chess.js"></script>
<script type="text/javascript" src="/javascript/game.js"></script>
<script type="text/javascript" src="/javascript/chat.js"></script>
<script type="text/javascript">
game.gameKey = "{{game_key}}";
</script>
{% endblock %}
{% block header %}
<div class="header">
<a href="/">Main</a>
<a href="/lobby">Return to Lobby</a>
</div>
{% endblock %}
{% block logo %}
<div class="title">Loading game from server...</div>
{% endblock %}
{% block content %}
<img class="busy" src="/images/spin32.gif"/>
<div class="waitingForOpponent" style="display:none">
Waiting for your opponent..
</div>
<div class="yourTurn" style="display:none">
Your turn!
<a class="btn" id="resignGame">Resign</a>
<a class="btn" id="offerDraw">Offer Draw</a>
</div>
<div class="gameOver" style="display:none">
</div>
<div class="statusTop" style="display:none">
<div class="blackHeader">
<div class="hdrLeft">
<span id="blackIndicator">></span>
<img src="/images/black_king.gif"/>
<span id="blackPlayer"> </span>
</div>
<div class="hdrRight">
<div class="timeDisplay" style="display:none">
<span id="blackTime"> </span>
</div>
</div>
</div>
</div>
<div class="gameBoard"> </div>
<div class="statusBottom" style="display:none">
<div class="whiteHeader">
<div class="hdrLeft">
<span id="whiteIndicator">></span>
<img src="/images/white_king.gif"/>
<span id="whitePlayer"> </span>
</div>
<div class="hdrRight">
<div class="timeDisplay" style="display:none">
<span id="whiteTime"> </span>
</div>
</div>
</div>
</div>
<div class="chatGroup" style="display:none">
<div class="chat">
</div>
Private Chat: <input type="text" id="chatInput" style="width:60%">
<a class="btn" id="sendGameChat">Send</a>
</div>
<div class="templates">
<div class="piece rook white"></div>
<div class="piece knight white"></div>
<div class="piece bishop white"></div>
<div class="piece queen white"></div>
<div class="piece king white"></div>
<div class="piece pawn white"></div>
<div class="piece rook_black black"></div>
<div class="piece knight_black black"></div>
<div class="piece bishop_black black"></div>
<div class="piece queen_black black"></div>
<div class="piece king_black black"></div>
<div class="piece pawn_black black"></div>
<div class="piece blank"></div>
</div>
<div id="acceptDrawDialog" class="dialogContent">
<div class="dialogTitle">Accept Draw?</div>
<div class="dialogBody">
Your opponent has offered to end this game in a draw.<br/><br/>
Do you wish to accept?
</div>
<div class="buttonBar">
<a class="btn" id="acceptDraw">Accept</a>
<a class="btn" id="rejectDraw">Reject</a>
</div>
</div>
<div id="drawRefusedDialog" class="dialogContent">
<div class="dialogTitle">Draw refused</div>
<div class="dialogBody">
Your opponent has refused to end this game in a draw.
</div>
<div class="buttonBar">
<a class="btn" id="closeModal">OK</a>
</div>
</div>
<div id="promoteDialog" class="dialogContent">
<div class="dialogTitle">Promote Pawn</div>
<div class="dialogBody">
<form id="promoteForm">
<label>Select a new piece:</label></br>
<div class="radioGroup">
<input type="radio" checked="checked" name="promote" value="1" />Queen<br/>
<input type="radio" name="promote" value="2"/>Rook<br/>
<input type="radio" name="promote" value="3"/>Bishop<br/>
<input type="radio" name="promote" value="4"/>Knight<br/>
</div>
</form>
<div class="buttonBar">
<span>
<a class="btn" id="doPromote">Promote pawn</a>
<a class="btn" id="closeModal">Cancel</a>
</span>
</div>
</div>
</div>
{% endblock %}