got the same problem on input ["a4", "dxc6", "gxh4", "axb2", "bxc4", "a2", "axb4", "b2", "c3"]
Expected: "gxh4 is invalid", instead got: "dxc6 is invalid"
Moves: ["exd3", "c5", "e5", "a2", "f3", "g5", "c2", "e4", "c4"]
Expected: "e5 is invalid", instead got: "exd3 is invalid"
I printed the moves array and it shows clearly that a capturing move on the first turn should be invalid. I can also pass the kata after submitting a few times, presumbly the bugged test is not generated.
looks like I fixed tests in Ruby, so now some solutions become invalid. Hope nobody cares a lot.
got the same problem on input ["a4", "dxc6", "gxh4", "axb2", "bxc4", "a2", "axb4", "b2", "c3"]
Expected: "gxh4 is invalid", instead got: "dxc6 is invalid"
The reference implementation apparently does not check if there is a piece to be captured.
On 'cxd3' as the first move it happily moves the white c pawn to d3.
Same stuff happened to me, also forced my way through random tests, but I don't care enough to verify why this happens.
Moves: ["exd3", "c5", "e5", "a2", "f3", "g5", "c2", "e4", "c4"]
Expected: "e5 is invalid", instead got: "exd3 is invalid"
I printed the moves array and it shows clearly that a capturing move on the first turn should be invalid. I can also pass the kata after submitting a few times, presumbly the bugged test is not generated.
Could you give original board inputs? 7 other people have passed this though, are you sure you haven't mutated the input in some way?
The random test in Ruby is bugged. When an invalid capturing move is given, the move after it is expected??
["cxb3", "b6", "b6"]
Expected: "b6 is invalid", instead got: "cxb3 is invalid"
["cxd3", "b7", "a2", "b7", "a4", "gxh6", "a4", "d4", "d4"]
Expected: "b7 is invalid", instead got: "cxd3 is invalid"
["dxc3"]
Expected: [[".", ".", ".", ".", ".", ".", ".", "."], ["p", "p", "p", "p", "p", "p", "p", "p"], [".", ".", ".", ".", ".", ".", ".", "."], [".", ".", ".", ".", ".", ".", ".", "."], [".", ".", ".", ".", ".", ".", ".", "."], [".", ".", "P", ".", ".", ".", ".", "."], ["P", "P", "P", ".", "P", "P", "P", "P"], [".", ".", ".", ".", ".", ".", ".", "."]], instead got: "dxc3 is invalid"
["e3", "a6", "fxe3", "c3", "b3", "a4"]
Expected: "c3 is invalid", instead got: "fxe3 is invalid"