Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Legal Move Chess Engine

This project now implements a real chess move generator (not a precomputed state table).

Features

  • Full legal move generation from arbitrary FEN positions.
  • Move legality enforcement with check detection.
  • Support for castling, en passant, and all promotion pieces.
  • Interactive board: click pieces/squares or use the legal move list.
  • Extra utilities: undo, load FEN, start position, perft depth 1-3.
  • Experimental Chromium CSS layer using if(), style queries, and custom @function.
  • Board rendering is CSS-first: JavaScript writes only state (--sq-a8...--sq-h1) and square attributes; CSS draws pieces/highlights.
  • Status and counters are CSS-generated text (content: var(...)) fed by JS-set custom properties.
  • Move list is pre-rendered slot buttons in HTML; JS only updates each slot's CSS label variable and active flags.

Technical note

A complete legal move generator is algorithmic and cannot be represented practically as pure CSS selectors. This implementation keeps CSS for rendering and interaction styling, and uses JavaScript for engine logic.

The advanced CSS layer is currently Chromium-focused and degrades gracefully in browsers without those features.

Run

Open index.html in a browser.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages