Problem 315. Valid Chess Moves
Solution Stats
Problem Comments
-
2 Comments
Hard !
This is a good problem, but it needs more test cases. There is no test with the King for instance, and there should be a true and false state test for every piece.
Solution Comments
-
1 Comment
by for not enough test cases:
z = ismember(x(1),'cNR');
fullfills all test cases, but doesn't verify any chess move.
-
1 Comment
Brilliant!
-
3 Comments
this doesn't take into account captures or moving a pawn 2 moves from its starting position. should it?
and the occasional other weird rules...
Captures and pawn 2 moves and castling and such aren't possible based upon the assumptions I stated (i.e. no other pieces on the board, the previous move was valid, etc)
Problem Recent Solvers58
Suggested Problems
-
4761 Solvers
-
Find the alphabetic word product
2899 Solvers
-
Remove the polynomials that have positive real elements of their roots.
1253 Solvers
-
How many trades represent all the profit?
575 Solvers
-
Who is the smartest MATLAB programmer?
701 Solvers
More from this Author39
Problem Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!