forked from ornicar/pgn4web
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchess960wch06.html
141 lines (121 loc) · 6.29 KB
/
chess960wch06.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
134
135
136
137
138
139
140
141
<html>
<!--
pgn4web javascript chessboard
copyright (C) 2009, 2010 Paolo Casaschi
see README file and http://pgn4web.casaschi.net
for credits, license and more details
-->
<head>
<title>Chess960 World Championship 2006</title>
<link href="chess960wch06.css" type="text/css" rel="stylesheet" />
<link rel="shortcut icon" href="pawn.ico" />
<script src="pgn4web.js" type="text/javascript"></script>
<script type="text/javascript">
SetPgnUrl("chess960wch06.pgn"); // if set, this has precedence over the inline PGN in the HTML file
SetImagePath("uscf/28"); // use "" path if images are in the same folder as this javascript file
SetImageType("png");
SetHighlightOption(true); // true or false
SetGameSelectorOptions(" ...", false, 0, 0, 1, 7, 7, 3, 0); // (head, num, chEvent, chSite, chRound, chWhite, chBlack, chResult, chDate);
SetCommentsIntoMoveText(true);
SetCommentsOnSeparateLines(true);
SetAutoplayDelay(2500); // milliseconds
SetAutostartAutoplay(false);
SetAutoplayNextGame(false); // if set, move to the next game at the end of the current game during autoplay
SetInitialGame(1); // number of game to be shown at load, from 1 (default); values (keep the quotes) of "first", "last", "random" are accepted; other string values assumed as PGN search string
SetInitialHalfmove(2, true); // halfmove number to be shown at load, 0 (default) for start position; values (keep the quotes) of "start", "end", "random" and "comment" (go to first comment) are also accepted. Second parameter if true applies the setting to every selected game instead of startup only (default)
SetShortcutKeysEnabled(true);
// SetLiveBroadcast(0, false, false); // set live broadcast; parameters are delay (refresh delay in minutes, 0 means no broadcast, default 0) alertFlag (if true, displays debug error messages, default false) demoFlag (if true starts broadcast demo mode, default false)
function customFunctionOnPgnGameLoad() {
if (theObject = document.getElementById('GameFEN'))
{ theObject.innerHTML = gameFEN[currentGame].match(/\s*\S*/); }
if (theObject = document.getElementById('GameWhite'))
{ theObject.innerHTML = theObject.innerHTML.match(/\s*[^,]*/); }
if (theObject = document.getElementById('GameBlack'))
{ theObject.innerHTML = theObject.innerHTML.match(/\s*[^,]*/); }
}
</script>
</head>
<body>
<!-- paste your PGN below and make sure you dont specify an external source with SetPgnUrl() -->
<form style="display: none;"><textarea style="display: none;" id="pgnText">
</textarea></form>
<!-- paste your PGN above and make sure you dont specify an external source with SetPgnUrl() -->
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr valign=top>
<td width="308" align="left">
<p class="label" style="text-align: center;">
Mainz GER, 2006
<br/>
Chess960 rapid WCh
</p>
<table width="100%"><tr><td align="left" width="15%">
<div class="label">#<span id="GameRound"></span></div>
</td><td align="center" width="70%">
<div class="label">
<span id="GameWhite"></span>
-
<span id="GameBlack"></span>
</div>
</td><td align="right" width="15%">
<div class="label"><span id="GameResult"></span></div>
</td></tr></table>
<p></p>
<div id="GameBoard"></div>
<p></p>
<div id="GameButtons"></div>
<p></p>
<div id="GameSelector"></div>
<p></p>
<div style="font-size: 70%; text-align: left;" id="GameFEN"></div>
<p></p>
<div style="font-size: 70%; text-align: justify;" id="GameText"></div>
</td>
<td align="left">
<div style="text-align: left; margin-left: 40px; margin-right: 5px;">
These are the games for the <a target="_blank" href="http://en.wikipedia.org/wiki/Chess960">Chess960</a> rapid World Championship 2006 in Mainz (Germany) between Levon Aronian (Armenia) and Peter Svidler (Russia). Aronian won the match 5-3, with no draws!
<p></p>
<p></p>
<i>
<script type="text/javascript">
document.write('This page shows how <a target="_blank" href="' + pgn4web_project_url + '">pgn4web</a> supports <a target="_blank" href="http://en.wikipedia.org/wiki/Chess960"><b>Chess960</b></a>, a.k.a. <b>Fischer random chess</b>.');
</script>
This chess variant uses the same board and pieces as standard chess, with extended options for the starting position and castling rules adapted accordingly.
<p></p>
Starting position
<ul style="margin-top:0px; list-style-type:square;">
<li>pawns start in the same position as in standard chess</li>
<li>White pieces are placed randomly on the first rank
<ul style="list-style-type:square;">
<li>the King must be placed somewhere between the Rooks</li>
<li>the Bishops must be on opposite color squares</li>
</ul></li>
<li>Black pieces are placed equal and opposite to the White pieces</li>
</ul>
<p></p>
Castling rules
<ul style="margin-top:0px; list-style-type:square;">
<li>castling is allowed under the following conditions
<ul style="list-style-type:square;">
<li>the King and the castling Rook must not have moved before</li>
<li>no square between the King's initial and final squares may be under attack by any opposing piece</li>
<li>all the squares between the King's initial and final squares and all the squares between the Rook's initial and final squares must be vacant except for the King and the castling Rook</li>
</ul></li>
<li>after castling, the Rook and King's final positions are exactly the same as they would be in standard chess</li>
</ul>
<p></p>
Games notation
<ul style="margin-top:0px; list-style-type:square;">
<li>games are recorded using the <a target="_blank" href="http://en.wikipedia.org/wiki/Portable_Game_Notation">PGN notation</a>, with an extension to the <a target="_blank" href="http://en.wikipedia.org/wiki/Forsyth-Edwards_Notation">FEN notation</a> in order to support castling information</li>
<li>two very similar <a target="_blank" href="http://en.wikipedia.org/wiki/Forsyth-Edwards_Notation">FEN</a> extensions have been proposed: <a target="_blank" href="http://en.wikipedia.org/wiki/X-FEN">X-FEN</a> and Shredder-FEN</li>
<script type="text/javascript">
document.write(' <li><a target="_blank" href="' + pgn4web_project_url + '">pgn4web</a> understands both extensions and generates <a target="_blank" href="http://en.wikipedia.org/wiki/X-FEN">X-FEN</a> strings when clicking the B8 square (assuming White on bottom, G1 otherwise)</li>');
</script>
</ul>
</i>
</div>
</td>
</tr>
</table>
<p></p>
</body>
</html>