Jump to content

User:קיפודנחש/test

From mediawiki.org

This is a demo page to chess-browser prototype, written in lua.

For some details see

in order for the browser to work, you need to load a script. you can do it as one-off, by pressing F12 and feeding the following line to the console, or a more permanent installation: paste the line in your Special:MyPage/common.js.

The line you need to execute in order to see the demo is:

importScript('User:קיפודנחש/chess-animator.js');

For readers with javascript disabled, the controls (buttons) are hidden, and instead, they see a red message stating that they need to activate javascript in the browser in order to see the game interactively.

Readers with JS enabled will see the buttons, regardless whether they load the script or not, but unless they do, neither buttons not clicking a notation will do anything.


Shows game at board 27d (parameter name: display. see wikicode below)

The board is shown in the requested display= move 24d . if no requested move specified, it's assumed to be the last state of the game.


1. e4 c5 2. Nf3 Nc6 3. Bb5 g6 4. Bxc6 dxc6 5. d3 Bg7 6. h3 Nf6 7. Nc3 Nd7 8. Be3 e5 9. O‑O b6 10. Nh2 Nf8 11. f4 exf4 12. Rxf4 Be6 13. Rf2 h6 14. Qd2 g5 15. Raf1 Qd6 16. Ng4 O‑O‑O 17. Nf6 Nd7 18. Nh5 Be5 19. g4 f6 20. b3 Bf7 21. Nd1 Nf8 22. Nxf6 Ne6 23. Nh5 Bxh5 24. gxh5 Nf4 25. Bxf4 gxf4 26. Rg2 Rhg8 27. Qe2 Rxg2+ 28. Qxg2 Qe6 29. Nf2 Rg8 30. Ng4 Qe8 31. Qf3 Qxh5 32. Kf2 Bc7 33. Ke2 Qg5 34. Nh2 h5 35. Rf2 Qg1 36. Nf1 h4 37. Kd2 Kb7 38. c3 Be5 39. Kc2 Qg7 40. Nh2 Bxc3 41. Qxf4 Bd4 42. Qf7+ Ka6 43. Qxg7 Rxg7 44. Re2 Rg3 45. Ng4 Rxh3 46. e5 Rf3 47. e6 Rf8 48. e7 Re8 49. Nh6 h3 50. Nf5 Bf6 51. a3 b5 52. b4 cxb4 53. axb4 Bxe7 54. Nxe7 h2 55. Rxh2 Rxe7 56. Rh6 Kb6 57. Kc3 Rd7 58. Rg6 Kc7 59. Rh6 Rd6 60. Rh8 Rg6 61. Ra8 Kb7 62. Rh8 Rg5 63. Rh7+ Kb6 64. Rh6 Rg1 65. Kc2 Rf1 66. Rg6 Rh1 67. Rf6 Rh8 68. Kc3 Ra8 69. d4 Rd8 70. Rh6 Rd7 71. Rg6 Kc7 72. Rg5 Rd6 73. Rg8 Rh6 74. Ra8 Rh3+ 75. Kc2 Ra3 76. Kb2 Ra4 77. Kc3 a6 78. Rh8 Ra3+ 79. Kb2 Rg3 80. Kc2 Rg5 81. Rh6 Rd5 82. Kc3 Rd6 83. Rh8 Rg6 84. Kc2 Kb7 85. Kc3 Rg3+ 86. Kc2 Rg1 87. Rh5 Rg2+ 88. Kc3 Rg3+ 89. Kc2 Rg4 90. Kc3 Kb6 91. Rh6 Rg5 92. Rf6 Rh5 93. Rg6 Rh3+ 94. Kc2 Rh5 95. Kc3 Rd5 96. Rh6 Kc7 97. Rh7+ Rd7 98. Rh5 Rd6 99. Rh8 Rg6 100. Rf8 Rg3+ 101. Kc2 Ra3 102. Rf7+ Kd6 103. Ra7 Kd5 104. Kb2 Rd3 105. Rxa6 Rxd4 106. Kb3 Re4 107. Kc3 Rc4+ 108. Kb3 Kd4 109. Rb6 Kd3 110. Ra6 Rc2 111. Rb6 Rc3+ 112. Kb2 Rc4 113. Kb3 Kd4 114. Ra6 Kd5 115. Ra8 1/2‑1/2

12345678
12345678
abcdefgh
abcdefgh

To see the game interactively, enable Javascript for your browser




wikicode

[edit]
{{#invoke:ChessBowserPrototype| demo 
| display = 27d
| pgn = 
[Event "WCh 2018"]
[Site "London ENG"]
[Date "2018.11.09"]
[Round "1"]
[White "Caruana, Fabiano"]
[Black "Carlsen, Magnus"]
[Result "1/2-1/2"]
[ECO "B31"]
[WhiteElo "2832"]
[BlackElo "2835"]
[PlyCount "229"]
[EventDate "2018.11.09"]

1. e4 c5 2. Nf3 Nc6 3. Bb5 g6 4. Bxc6 dxc6 5. d3 Bg7 6. h3 Nf6 7. Nc3 Nd7 8.
Be3 e5 9. O-O b6 10. Nh2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