Hacker News new | ask | show | jobs
by jka 1546 days ago
Yep, it's difficult to think how to handle impermissible moves gracefully in the general case.

I suppose that one option would be for the game state to diverge for each player, and only after both of them have reached a conclusion could they both be told the move at which that happened.

(and in that case, ensuring that both players reach their respective game's conclusion near the same point-in-time -- hiding the magic trick -- becomes a separate challenge)

1 comments

I mean, technically i implemented it with a few different board states to help organize the 'common knowledge' board, the 'up-to-date' board, and each players' respective information. :)

Beyond that, what you described is basically how the implementation operates anyways. it notifies a player if they are put in check (without identifying the threatening piece, though I could change that pretty easily), likewise if theres a checkmate/stalemate. And in a situation where only one move is possible, it just auto-uses that move and notifies the player.

So the two players dont really 'discover' the outcome of the game out-of sync, per se.

An especially fun part is related to piece capture - eg if black captures white's pawn, then on white's turn, they will simply see their piece missing. So technically they would 'know' about the capture before their opponent would, which...I cant really even imagine the implications of yet, since I haven't had a chance to playtest this variant yet :)

Hehe, this sounds like fun :) I should probably improve a bit at standard chess first, but I'll give it a try some time. Thanks for sharing!

An unrelated tangent: Have you watched Primer[1]?

[1] - https://en.wikipedia.org/wiki/Primer_(film)

I have not, is it good?
Kinda evading the question, but: I get the sense that you'd enjoy it.