|
|
back to boardIf WA#9 Try this: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 -3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 White c6-d7 Incorrect 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 6 0 0 0 0 0 0 0 0 0 0 0 0 0 -3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Re: If WA#9 I had WA9 because i thought there would be only one king of the same color, but seems like actually there might be more. Thankfully to take more kings into account i had to delete some of my code rather than add some. An example test: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 0 0 -1 0 0 0 0 0 0 6 0 6 0 0 0 0 0 1 White <any move> (for example a1-a2 or c1-c2) The answer is "Incorrect" and then a table, because no matter what white does, there's at least one king remaining under check. Also had WA7 because of using shortint and a bit too small constant for amount of available moves. After changing from 100 to 300 and from shortint to longint got AC. An example test, where white have 288 available moves: 5 5 5 5 5 5 5 5 5 0 0 0 0 0 0 5 5 0 0 0 0 0 0 5 5 0 0 0 0 0 0 5 5 0 0 0 0 0 0 5 5 0 0 0 0 0 0 5 5 0 0 0 0 0 0 5 5 5 5 5 5 5 5 5 1 White a1-b2 Result: "Draw" and table output. Edited by author 11.01.2016 03:55 |
|
|