Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <!-- saved from url=(0041)http://1kchess.an3.es/play-level-advanced -->
- <html lang="en">
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Online Chess - Level Advanced</title>
- <meta name="description" content="Test your chess game skills with the world's smallest chess program. Game level: Advanced.">
- <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0">
- <!-- 1kchess.an3.es -->
- <script src="./Online Chess - Level Advanced_files/ca-pub-1415407386988961.js.ladda ned"></script>
- <script>
- // aliases and constants
- function $(i) {
- return document.getElementById(i)
- }
- String.prototype.U = String.prototype.charCodeAt;
- M = Math.random;
- W = setTimeout;
- X = 10;
- Q = 15;
- H = 1e4
- // 2K chess (1683 bytes)
- b = 0;
- I = [];
- G = 120;
- l = [5, 3, 4, 6, 2, 4, 3, 5, 1, 1, 1, 1, 1, 1, 1, 1, 9, 9, 9, 9, 9, 9, 9, 9, 13, 11, 12, 14, 10, 12, 11, 13, 0, 99, 0, 306, 297, 495, 846, -1, 0, 1, 2, 2, 1, 0, -1, -1, 1, -10, 10, -11, -9, 9, 11, 10, 20, -9, -11, -10, -20, -21, -19, -12, -8, 8, 12, 19, 21];
- function P(w, c, h, e, S, s) {
- var t, o, L, E, d, O = e,
- N = -H * H,
- K = 78 - h << X,
- p, g, n, m, A, q, r, C, J, a = y ? -X : X;
- y ^= 8;
- G++;
- d = w || s && s >= h && P(0, 0, 0, 21, 0, 0) > H;
- do {
- if (o = I[p = O]) {
- q = o & Q ^ y;
- if (q < 7) {
- A = q-- & 2 ? 8 : 4;
- C = o - 9 & Q ? [53, 47, 61, 51, 47, 47][q] : 57;
- do {
- r = I[p += l[C]];
- if (!w | p == w) {
- g = q | p + a - S ? 0 : S;
- if (!r & (!!q | A < 3 || !!g) || (r + 1 & Q ^ y) > 9 && q | A > 2) {
- if (m = !(r - 2 & 7)) return y ^= 8, I[G--] = O, K;
- J = n = o & Q;
- E = I[p - a] & Q;
- t = q | E - 7 ? n : (n += 2, 6 ^ y);
- while (n <= t) {
- L = r ? l[r & 7 | 32] - h - q : 0;
- if (s) L += (1 - q ? l[(p - p % X) / X + 37] - l[(O - O % X) / X + 37] + l[p % X + 38] * (q ? 1 : 2) - l[O % X + 38] + (o & 16) / 2 : !!m * 9) + (!q ? !(I[p - 1] ^ n) + !(I[p + 1] ^ n) + l[n & 7 | 32] - 99 + !!g * 99 + (A < 2) : 0) + !(E ^ y ^ 9);
- if (s > h || 1 < s & s == h && L > Q | d) {
- I[p] = n, I[O] = m ? (I[g] = I[m], I[m] = 0) : g ? I[g] = 0 : 0;
- L -= P(s > h | d ? 0 : p, L - N, h + 1, I[G + 1], J = q | A > 1 ? 0 : p, s);
- if (!(h || s - 1 | B - O | i - n | p - b | L < -H)) return F(), G--, u = J;
- J = q - 1 | A < 7 || m || !s | d | r | o < Q || P(0, 0, 0, 21, 0, 0) > H;
- I[O] = o;
- I[p] = r;
- m ? (I[m] = I[g], I[g] = 0) : g ? I[g] = 9 ^ y : 0
- }
- if (L > N || s > 1 && L == N && !h && M() < .5) {
- I[G] = O;
- if (s > 1) {
- if (h && c - L < 0) return y ^= 8, G--, L;
- if (!h) i = n, B = O, b = p
- }
- N = L
- }
- n += J || (g = p, m = p < O ? g - 3 : g + 2, I[m] < Q | I[m + O - p] || I[p += p - O]) ? 1 : 0
- }
- }
- }
- } while (!r & q > 2 || (p = O, q | A > 2 | o > Q & !r && ++C * --A))
- }
- }
- } while (++O > 98 ? O = 20 : e - O);
- return y ^= 8, G--, N + H * H && N > -K + 1924 | d ? N : 0
- }
- B = i = y = u = 0;
- while (B++ < 120) I[B - 1] = B % X ? B / X % X < 2 | B % X < 2 ? 7 : B / X & 4 ? 0 : l[i++] | 16 : 7;
- function F() {
- B = b;
- for (p = 21; p < 99; ++p)
- if (q = $(p)) {
- q.innerHTML = "\xa0\u265f\u265a\u265e\u265d\u265c\u265b \u2659\u2654\u2658\u2657\u2656\u2655".charAt(I[p] & Q);
- q.lang = p - B
- }
- }
- F();
- function V(s) {
- i = (I[s] ^ y) & Q;
- if (i > 8) {
- b = s;
- F()
- } else if (B && i < 9) {
- b = s;
- i = I[B] & Q;
- if ((i & 7) == 1 & (b < 29 | b > 90)) i = 14 ^ y;
- P(0, 0, 0, 21, u, 1);
- if (y) W("P(0,0,0,21,u,3),P(0,0,0,21,u,1)", 250)
- }
- }
- </script>
- <style>
- html {
- font: 1em/1.3 georgia, serif;
- text-align: center
- }
- body {
- position: relative;
- box-sizing: border-box;
- max-width: 38em;
- margin: 0 auto;
- padding: 1px 0 3em
- }
- p#menu {
- margin: .4em 0;
- font: 1.75em cambria;
- color: #665
- }
- p#menu a {
- display: inline-block;
- padding: .2em .5em;
- white-space: nowrap
- }
- p#menu a:hover {
- background: AntiqueWhite
- }
- p span {
- white-space: nowrap
- }
- a {
- color: #385bc2;
- text-decoration: none
- }
- a:hover {
- color: #b53b3b
- }
- div#info {
- padding: 0 .5em;
- border: thin solid #385bc2;
- border-radius: .5em
- }
- table {
- margin: 0 auto 1em
- }
- td {
- width: 1.04em;
- height: 1.04em;
- overflow: hidden;
- font: 3em/1 "MS Gothic", "Segoe UI Symbol", "DejaVu Sans";
- background: Beige
- }
- tr:nth-child(odd) td:nth-child(even),
- tr:nth-child(even) td:nth-child(odd) {
- background: Tan
- }
- table {
- margin-top: .5em
- }
- td {
- font-size: 4em;
- cursor: pointer
- }
- td[lang='0'] {
- outline: thin solid #a00;
- color: #800
- }
- .side_ads {
- position: absolute;
- top: .5em;
- width: 160px;
- height: 600px
- }
- .side_ads.left {
- left: -180px
- }
- .side_ads.right {
- right: -180px
- }
- .ad_mobile {
- display: block
- }
- @media (min-width:40em) {
- table {
- border: solid IndianRed;
- border-width: 0 1em
- }
- .ad_mobile {
- display: none
- }
- }
- @media (max-width:40em) {
- body {
- width: 100%
- }
- p#menu small {
- display: none
- }
- div#info {
- margin-left: .5em;
- margin-right: .5em
- }
- table {
- box-shadow: .05em .05em .1em #666
- }
- .side_ads {
- display: none
- }
- }
- </style>
- </head>
- <body>
- <table>
- <tbody>
- <tr>
- <td onclick="V(21)" id="21">♜</td>
- <td onclick="V(22)" id="22">♞</td>
- <td onclick="V(23)" id="23">♝</td>
- <td onclick="V(24)" id="24">♛</td>
- <td onclick="V(25)" id="25">♚</td>
- <td onclick="V(26)" id="26">♝</td>
- <td onclick="V(27)" id="27">♞</td>
- <td onclick="V(28)" id="28">♜</td>
- </tr>
- <tr>
- <td onclick="V(31)" id="31">♟</td>
- <td onclick="V(32)" id="32">♟</td>
- <td onclick="V(33)" id="33">♟</td>
- <td onclick="V(34)" id="34">♟</td>
- <td onclick="V(35)" id="35">♟</td>
- <td onclick="V(36)" id="36">♟</td>
- <td onclick="V(37)" id="37">♟</td>
- <td onclick="V(38)" id="38">♟</td>
- </tr>
- <tr>
- <td onclick="V(41)" id="41"></td>
- <td onclick="V(42)" id="42"></td>
- <td onclick="V(43)" id="43"></td>
- <td onclick="V(44)" id="44"></td>
- <td onclick="V(45)" id="45"></td>
- <td onclick="V(46)" id="46"></td>
- <td onclick="V(47)" id="47"></td>
- <td onclick="V(48)" id="48"></td>
- </tr>
- <tr>
- <td onclick="V(51)" id="51"></td>
- <td onclick="V(52)" id="52"></td>
- <td onclick="V(53)" id="53"></td>
- <td onclick="V(54)" id="54"></td>
- <td onclick="V(55)" id="55"></td>
- <td onclick="V(56)" id="56"></td>
- <td onclick="V(57)" id="57"></td>
- <td onclick="V(58)" id="58"></td>
- </tr>
- <tr>
- <td onclick="V(61)" id="61"></td>
- <td onclick="V(62)" id="62"></td>
- <td onclick="V(63)" id="63"></td>
- <td onclick="V(64)" id="64"></td>
- <td onclick="V(65)" id="65"></td>
- <td onclick="V(66)" id="66"></td>
- <td onclick="V(67)" id="67"></td>
- <td onclick="V(68)" id="68"></td>
- </tr>
- <tr>
- <td onclick="V(71)" id="71"></td>
- <td onclick="V(72)" id="72"></td>
- <td onclick="V(73)" id="73"></td>
- <td onclick="V(74)" id="74"></td>
- <td onclick="V(75)" id="75"></td>
- <td onclick="V(76)" id="76"></td>
- <td onclick="V(77)" id="77"></td>
- <td onclick="V(78)" id="78"></td>
- </tr>
- <tr>
- <td onclick="V(81)" id="81">♙</td>
- <td onclick="V(82)" id="82">♙</td>
- <td onclick="V(83)" id="83">♙</td>
- <td onclick="V(84)" id="84">♙</td>
- <td onclick="V(85)" id="85">♙</td>
- <td onclick="V(86)" id="86">♙</td>
- <td onclick="V(87)" id="87">♙</td>
- <td onclick="V(88)" id="88">♙</td>
- </tr>
- <tr>
- <td onclick="V(91)" id="91">♖</td>
- <td onclick="V(92)" id="92">♘</td>
- <td onclick="V(93)" id="93">♗</td>
- <td onclick="V(94)" id="94">♕</td>
- <td onclick="V(95)" id="95">♔</td>
- <td onclick="V(96)" id="96">♗</td>
- <td onclick="V(97)" id="97">♘</td>
- <td onclick="V(98)" id="98">♖</td>
- </tr>
- </tbody>
- </table>
- <ins class="adsbygoogle ad_mobile" data-ad-client="ca-pub-1415407386988961" data-ad-slot="2403511195" data-ad-format="auto" data-adsbygoogle-status="done"></ins>
- <script async="" src="./Online Chess - Level Advanced_files/adsbygoogle.js.ladda ned"></script>
- <script>
- (adsbygoogle = window.adsbygoogle || []).push({});
- </script>
- <p id="menu">
- <a href="http://1kchess.an3.es/" title="Click here to go back to game level selection (this game will NOT be saved).">« 1kChess</a> [ level: 3 ] <a href="http://1kchess.an3.es/play-level-advanced#info" onclick="with(document.getElementById('info')){style.display=style.display?'':'none'}">( <b>?</b> )</a>
- </p>
- <div id="info" style="display:none">
- <p>
- In this level the computer will think a little while longer. For experts only! ;-)</p>
- <p>
- › To make your move, click on a white piece and then click on the target square.<br> › Press Ctrl and +/- to increase/decrease the chessboard's size.<br> › Hit F5 to start a new game (after checkmate or not).</p>
- </div>
- <p>
- © 2010-
- <script>
- document.write(new Date().getFullYear())
- </script>2016 Óscar Toledo G.
- <span>Modifications and this website by Andrés Moreno.</span>
- <br>
- <i>1kChess, play chess online with the only 1-kB chess game program!</i>
- </p>
- <p></p>
- <ins class="adsbygoogle side_ads left" data-ad-client="ca-pub-1415407386988961" data-ad-slot="4519372796" data-ad-format="auto" data-adsbygoogle-status="done" style="height: 600px;"><ins id="aswift_0_expand" style="display:inline-table;border:none;height:600px;margin:0;padding:0;position:relative;visibility:visible;width:160px;background-color:transparent"><ins id="aswift_0_anchor" style="display:block;border:none;height:600px;margin:0;padding:0;position:relative;visibility:visible;width:160px;background-color:transparent"><iframe width="160" height="600" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&&s.handlers,h=H&&H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&&d&&(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}" id="aswift_0" name="aswift_0" style="left:0;position:absolute;top:0;" src="./Online Chess - Level Advanced_files/saved_resource.html"></iframe></ins></ins>
- </ins>
- <script async="" src="./Online Chess - Level Advanced_files/adsbygoogle.js.ladda ned"></script>
- <script>
- (adsbygoogle = window.adsbygoogle || []).push({});
- </script>
- <ins class="adsbygoogle side_ads right" data-ad-client="ca-pub-1415407386988961" data-ad-slot="4519372796" data-ad-format="auto" data-adsbygoogle-status="done" style="height: 600px;"><ins id="aswift_1_expand" style="display:inline-table;border:none;height:600px;margin:0;padding:0;position:relative;visibility:visible;width:160px;background-color:transparent"><ins id="aswift_1_anchor" style="display:block;border:none;height:600px;margin:0;padding:0;position:relative;visibility:visible;width:160px;background-color:transparent"><iframe width="160" height="600" frameborder="0" marginwidth="0" marginheight="0" vspace="0" hspace="0" allowtransparency="true" scrolling="no" allowfullscreen="true" onload="var i=this.id,s=window.google_iframe_oncopy,H=s&&s.handlers,h=H&&H[i],w=this.contentWindow,d;try{d=w.document}catch(e){}if(h&&d&&(!d.body||!d.body.firstChild)){if(h.call){setTimeout(h,0)}else if(h.match){try{h=s.upd(h,i)}catch(e){}w.location.replace(h)}}" id="aswift_1" name="aswift_1" style="left:0;position:absolute;top:0;" src="./Online Chess - Level Advanced_files/saved_resource(1).html"></iframe></ins></ins>
- </ins>
- <script async="" src="./Online Chess - Level Advanced_files/adsbygoogle.js.ladda ned"></script>
- <script>
- (adsbygoogle = window.adsbygoogle || []).push({});
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement