Do not expect the code to be stable under any modifications, but you can try if you want I guess. Also there are barely any comments sorry. I am in Electrical Engineering and I like writing shitty code to piss off my Computer Science friends."
I appreciate this README's sense of humor
Fucking awful barely-functioning open source code is better than no code available, every time.
So I've always found it very bizarre that if it's a player's move, but any possible move would put their own king in check, then it is a draw (rather than a loss).
This leads to a situation where one side can have almost no pieces left, perhaps only the king, but still somehow draw since the king can't move anywhere where it wouldn't be captured.
I imagine a king all by himself peeping his head out out for a place to move, but everywhere is covered by snipers, so, since he can't move anywhere without getting captured, despite being overwhelmed by enemy forces he yells out a la monte Python "So we'll call it a draw then!"
Check yourself before you wreck yourself. And yes, check pun intended.
?
In my family, against my children, it's a running joke that I'll almost always fail to win, and stalemate them.
What is difficult is adapting chess's rules to this analog environment. It would be similarly difficult if you played this way with a real chess set in the real world, has nothing to do with code.
https://www.chessgames.com/perl/chessgame?gid=2024861.
White castled short on move 10 and long on move 33. That didn’t help, though. White lost the game.
Also, it seems that site’s software doesn’t allow entering the full game.
Resolving irregularities does require your opponent to notice the irregularity and bring it to the attention of the referee.
Not sure about Blitz.
Note that it can be discovered during a game that a move several turns ago was actually illegal, and the board should be returned to that position (and times adjusted). I had this happen to me once.
Additionally, there are many contradictory rules that can't all be applied, so there is a lot of room for the tournament director to apply the rules according to the spirit of the game rather than the word of the law.
When I was in school, we used to play blitz like that. You lost track of your king, boom, you're dead
I don't think this is true, it should be perfectly possible to cover the opponent's king's entire movement area with your pieces.
I'd love to see a version of this game that actually implements this :D
A queen and a rook or bishop also can enclose a triangular area that is just large enough to contain the king.
(Talking of bishops: should this game require bishops to stay on squares of their starting colour?)
Given how captured work and how you'd probably define "on a square" with white a bit of freedom (perhaps the center of the piece has to be within the square?) I doubt it'd matter much either way.
(I guess, Vikings would appreciate the constraints arising from infinitesimal granularity movement.)