Readme

Static Chess

Check it out here: https://chess.maxmcd.com

Plain, brutalist, no bloat chess. Every page is only html and css. Every chess move is made by clicking a link. Send a link to your friend and they'll send you one back to make your move. No silly animations or slick interactivity to trip up your gameplay. When Google indexes this site will we successfully compute all possible chess moves?

Functionality is quite limited, and things might be broken. Please let me know if you find bugs!

Inspired by this HN discussion about sites that have all possible game states of tic-tac-toe.

I plan on extending this to support real gameplay. I think it could be a nice simple interface for long form games with friends. Might also be fun to add a static AI to play against. Feel free to PR any changes if you'd like to see something added.

Val Town is a social website to write and deploy JavaScript.
Build APIs and schedule functions from your browser.
Comments
7
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

maxm-staticchess.web.val.run
September 10, 2024