Code Monkey home page Code Monkey logo

ab-chess's People

Contributors

nimzozo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

ab-chess's Issues

Chessboard Display Problem

The chessboard is not displaying properly

image

At the bottom the files are there but not the correct height. The Pieces move properly but they are not visible.
My code: I used this: AbChess-0.3.0.zip but extracted as a folder

<title>Chess-Website</title>
<script src="AbChess-0.3.0/AbChess-0.3.0-min.js"></script>

Random moves example

When a promotion occures and if we switch the browser's tab, the promoted piece isn't removed from the DOM.

Animate pieces movement

What needs animation :

  • failed drop
    • outside the board
    • inside the board
  • succeeded drop
    • normal moves
    • captures
    • castles
    • promotions
  • programmatic moves
    • normal moves
    • captures
    • castles
    • promotions
  • game navigation
    • normal moves
    • captures
    • castles
    • promotions

Please add reverse move

It would be nice to be able to take a move back, or to have buttons where moves could be taken back.

Responsive board

Might consider adding responsive board UI also a get last move method perhaps.

PGN export

92 ...Rc1 was exported as 92 ...O-O-O

  1. Na3 e6 2. c3 Bd6 3. Nb5 h6 4. f4 Bc5 5. b3 Qe7 6. f5 Kd8 7. Ba3 Nf6
  2. Qc2 d6 9. Nxd6 a5 10. Qb1 Bd4 11. d3 e5 12. Bc5 Be6 13. Nc8 Bf2+ 14. Kxf2
    Bxb3 15. Bxe7+ Kxc8 16. Bc5 Ra6 17. Ba3 Ba4 18. e3 Bc6 19. Bc5 Ng8 20. Qd1
    g5 21. a4 b5 22. h4 gxh4 23. Rb1 bxa4 24. Rxb8+ Kd7 25. Qc2 Bxg2 26. Qb2
    Ne7 27. Qb6 f6 28. Ra8 h3 29. Re8 Bd5 30. Bb4 Rxe8 31. Qxa5 a3 32. Rh2 Bf7
  3. Qb5+ Kc8 34. Qxe5 Ng6 35. Qxe8+ Kb7 36. Kf3 Re6 37. Re2 Re7 38. Rh2 h5
  4. Kf2 c5 40. Ne2 Kb6 41. e4 Rd7 42. Qxf7 Rd6 43. Bxa3 Rd4 44. Qxg6 Kb7 45.
    cxd4 h4 46. Rh1 Ka6 47. Qg3 Ka5 48. Rg1 c4 49. Qg4 Ka4 50. Ke1 cxd3 51. Qg2
    Kb5 52. Rh1 d2+ 53. Kxd2 Ka4 54. e5 Ka5 55. exf6 Ka6 56. Kd1 Ka7 57. Qe4 Ka6
  5. Rh2 Kb6 59. Bf8 Ka7 60. f7 Kb6 61. Bg7 Kc7 62. Rxh3 Kd6 63. Bf8+ Kd7 64.
    Qd5+ Kc8 65. Rb3 h3 66. Qb5 Kd8 67. Rg3 Kc7 68. Rf3 Kc8 69. Bg7 Kc7 70. f6
    Kd6 71. Ra3 Kc7 72. Qe8 h2 73. Bf8 Kb7 74. Bh3 h1=R+ 75. Kc2 Kb6 76. Qa8 Kb5
  6. Bg2 Rh5 78. Nf4 Rh1 79. Bb4 Rh2 80. Rc3 Rh8 81. Ne6 Rh5 82. Rb3 Rh3 83.
    Qa7 Rh1 84. Qe7 Rc1+ 85. Kd2 Rc6 86. Rb2 Rxe6 87. Kc1 Kc4 88. Bd6 Re1+ 89.
    Kd2 Kxd4 90. Qf8 Kc4 91. Qc8+ Kd4 92. Qf5 O-O-O 93. Qg4# 1-0

PGN export bug

I did generate this invalid game. (Illegal 40. Rc1)
Not able to reproduce though.

[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "?"]
[White "Math.random()"]
[Black "Math.random()"]
[Result "1/2-1/2"]

1. Nc3 Nh6 2. d4 e5 3. Bg5 Qe7 4. Bc1 Qf6 5. h3 Qf3 6. Nxf3 Nc6 7. dxe5 Ng4
8. Qd5 g5 9. Qd1 Nh2 10. Nd2 Kd8 11. Nf3 b5 12. Rb1 Bc5 13. Bd2 Rb8 14. Nxb5
Rb7 15. b3 Bb4 16. Rc1 a6 17. c3 Ke7 18. Rb1 a5 19. Bf4 Kf8 20. Ra1 Ke8
21. Na3 a4 22. Nd4 g4 23. hxg4 Kf8 24. Nc2 Ke8 25. Qd2 Rb5 26. g5 Ba5 27. e3
Rxe5 28. Kd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Qc3+ 115. Ke2 Kd6 116. Kf1 Qd2 117. Rb4 Qh6
118. Rb2 Ke5 119. Rg2 Qh5 120. Rh2 Qh6 121. Rh3 Kd6 122. Rf3 Qg6 123. Ra3 Qg7
124. Rg3 Qxf6+ 125. Rf3 Qg5 126. Rf6+ Ke5 127. Rf2 Qc1+ 128. Ke2 Qb1 129. Rf1
Ke4 130. Rf3 Qd3+ 131. Kf2 Qa3 132. Kg3 Qxa4 133. Kf2 Ke5 134. g5 Qa6 135. Rf8
Qe2+ 136. Kg3 Qb2 137. Rg8 Qb1 138. Kg2 Kd5 139. Kh3 Qf5+ 140. Kg2 Qf2+
141. Kxf2 Kd4 142. Rc8 Kd3 143. Na6 Kd2 144. Rf8 Kc2 145. Rc8+ Kd2 146. Rg8
Kd3 147. Re8 Kd2 148. Re2+ Kc3 149. Re4 Kb3 150. Nc5+ Kc3 151. Nb3 Kxb3
152. Rc4 Kxc4 153. Ke2 Kd5 154. g6 Ke6 155. Kf2 Kd6 156. Ke2 Kd5 157. Kf3 Kc4
158. Kf4 Kb5 159. Kg5 Ka5 160. Kg4 Ka6 161. Kf3 Ka7 162. Kf2 Kb8 163. Kg2 Kc7
164. Kh1 Kd8 165. Kg2 Kc7 166. Kg1 Kc6 167. Kf1 Kb5 168. Ke2 Kb4 169. Kf3 Kc5
170. Ke2 Kb4 171. Ke1 Kc5 172. g7 Kc6 173. Ke2 Kd7 174. g8=R Kc7 175. Rg4 Kc6
176. Rg8 Kb6 177. Kd3 Kc6 178. Ke3 Kd7 179. Re8 Kxe8 1/2-1/2

help

Hi!

I would like to make it so that the game starts not from the starting position of all the figures, but from the target position with the correct FEN, but I get an error. Can you tell me how to do it correctly?

reset() no working

Documentation states "Create a new game and set the chessboard to the initial starting position."

This is not the case: simply call reset on your abChess object. The chessboard pieces remain in their position.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.