tianshuo avatar

You did not check if it's checkmate/stalemate. For example after

  1. f3 e5
  2. g4 Qh4# It still says white to go.
maxm avatar

@tianshuo nice, thank you.

Also going to add this link here: https://lobste.rs/s/ttyfuk/static_chess#c_e0sq0q And this one: https://news.ycombinator.com/item?id=40348343

Should fix these bugs and consider making the described changes.

peterqliu avatar

my first reaction before clicking the link was "but does it have en passant"?

great work, nonetheless

nbbaier avatar

I might be missing something here, where is the import for the Game constructor used here: https://www.val.town/v/maxm/staticChess#L21

nbbaier avatar

And actually, for that matter, where is parseURL coming from? That doesn't seem to be defined either. (https://www.val.town/v/maxm/staticChess#L17)

maxm avatar

@nbbaier I tried to clean things up a little by breaking them out, but it does make the code a littler harder to understand. If you scroll past the StaticChess class Game and parseURL are defined lower down in the file.

nbbaier avatar

@maxm - ah yeah, now I see that. Don't know why I didn't just ⌘+F sigh

May 27, 2024