Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blacks don't castle properly in Demi-Chess_JoclyBoard_0.9.12 #19

Open
ecobabush opened this issue Aug 12, 2017 · 2 comments
Open

Blacks don't castle properly in Demi-Chess_JoclyBoard_0.9.12 #19

ecobabush opened this issue Aug 12, 2017 · 2 comments

Comments

@ecobabush
Copy link

When Blacks do a castling they don't interchange the positions of the king and a rook. They only move chess pieces towards each other and stay them side by side.

@ecobabush
Copy link
Author

I have opened 2 issues #19 and #20 here in joclyboard. Now I think it would be better to open them in jocly. The question is what to do with all this stuff now? Reopen it at jocly or not?

I am not a programmer. I try to study Java. As I understood you use JavaScript in Jocly.
I took a look on the code at https://github.com/mi-g/jocly/tree/master/src/games/chessbase/demi-model.js

111-114 lines
castle: {
"0/3": {k:[1,2],r:[2,1],n:"O-O"},
"28/31": {k:[30,29],r:[29,30],n:"O-O"},
},
White makes castling well. "0/3": {k:[1,2],r:[2,1],n:"O-O"},
0 - is position of white king, 3 - of white rook.

Black makes castling wrong. "28/31": {k:[30,29],r:[29,30],n:"O-O"},
28 - is position of black king, 31 - of black rook.

Therefore even without my understanding of all this stuff "28/31": {k:[30,29],r:[29,30],n:"O-O"}
I suggest to make it like this "28/31": {k:[29,30],r:[30,29],n:"O-O"}.
This means black king (k) moves from position 28 to 29, then to 30 and
black root (r) moves from position 31 to 30, then to 29.

@ecobabush
Copy link
Author

I have made commits and a pull request. I hope it helps to remove bugs with castlings in demi-chess and Malett chess. It is my first time to use github and do commits. Then I had some troubles with commits. I hope you will solve my mistake. I am not English.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant