Skip to content

v1.2.1-rp2040 \u2014 castling visual hint

Pre-release
Pre-release

Choose a tag to compare

@semichcsc-byte semichcsc-byte released this 11 May 18:01
· 5 commits to main since this release

Patch release

Adds a clear visual walkthrough for the castle move that previously required the user to know FIDE rules ("now move the rook too"). Also bundles in some source code that was only on my workspace machine and missing from the previous v1.0..v1.2 git tags.

What's new

When you complete a kingside (king to g-file) or queenside (king to c-file) castle in Human-vs-Human mode, the board now:

  1. Flashes the rook source square in blinking blue (4x) — tells you which rook to lift.
  2. Lights the rook destination square in solid blue — tells you where to put it.
  3. Holds both lit for 2 seconds so a slow user catches the hint.
  4. Logs Castling: move the rook from h1 to f1 (or appropriate squares) to serial.

Known limitation

Castling visual hint is Human-vs-Human only for now. AI mode (chess_bot::executeBotMove) still does direct board mutation instead of going through ChessEngine::applyMove, so:

  • The hint isn't drawn in AI mode
  • The bot's castles also leave the rook on its original square (king moves but rook stays put — invalid state)

Both will be fixed in v1.3 by refactoring chess_bot.cpp to use applyMove (which will also fix the row-axis serial print mirror in one pass).

Verified

Sketch uses 148801 bytes (0%) of program storage space.
Global variables use 44640 bytes (16%) of dynamic memory.
=== Self-tests complete: 10/10 passed ===

How to flash

Drag-and-drop OpenChess-v1.2.1-rp2040.uf2 onto the RPI-RP2 USB drive after double-tapping the white reset button.

Source

Branch feat/v1.2.1-castling-visual-hint