Re:Students at Berlin University Build Chess Game on Ethereum
by TylerE on Tuesday September 06, 2016 @03:37PM
(#12438698)
There are many ways out of a check besides moving the king - capturing the checking piece, interposing another piece in between (Which can even expose a check on the OTHER king), etc.
[ Parent
| on HN ]
Re:Students at Berlin University Build Chess Game on Ethereum
by schoen on Tuesday September 06, 2016 @03:46PM
(#12438760)
Actually, you've just listed both of the other ways of eliminating check.
https://en.wikipedia.org/wiki/Check_(chess)#Getting_out_of_c...
While your analysis is right, you don't really need the "etc." at the end!
Re:Students at Berlin University Build Chess Game on Ethereum
by AstralStorm on Tuesday September 06, 2016 @10:06PM
(#12440574)
It is a highly constrained search though. You need to verify moves against the piece that is checking only and then verify if the move potentially preventing the check does not discover another check.
Even easier in case of double checks, since you exclude captures.
Verifying a tie or mate due to repetition is more tricky for a usual test, but not if you hash the whole board state.