Problem 45332. Castling-03
Given the position of different chess pieces on the chessboard, figure out whether castling is valid or not in the next move (white king).
- a=position of white pieces
- b=position of black pieces
https://en.wikipedia.org/wiki/Castling
Previous problem https://www.mathworks.com/matlabcentral/cody/problems/45330-castling-02#
Solution Stats
Problem Comments
-
3 Comments
Asif Newaz
on 16 Feb 2020
Let me know if u find any discrepency
Rafael S.T. Vieira
on 8 Nov 2022
I had to consider so many cases that I am almost sure some "solutions" are wrong. lol
Rafael S.T. Vieira
on 8 Nov 2022
For instance, in the last test, instead of having the Rook at b2, why not put it at d7? b={'Ba8','Bg7','Rh6','Rd7'}.
Solution Comments
Show commentsProblem Recent Solvers7
Suggested Problems
-
Find common elements in matrix rows
2633 Solvers
-
1273 Solvers
-
1886 Solvers
-
Back to basics 16 - byte order
193 Solvers
-
Magic is simple (for beginners)
9198 Solvers
More from this Author165
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!