xeenoon / ChessApp

0 stars 0 forks source link

UI #9

Closed xeenoon closed 2 years ago

xeenoon commented 2 years ago

Added a UI for the chess engine image

Works for two player chess, uses the bitboard move generator. Primary purpose was to create a visualization of possible moves to make sure there were no bugs in the move generation algorithm

There were alot of bugs in the move generation algorithm. All bugs that were easily spotted with the UI were fixed This includes

  1. Issues with pins
  2. Static piece attacks
  3. Piece captures
  4. Castling
  5. Enpassante
  6. Promotion
  7. Ghost pieces (Pieces that weren't included in the blockers board)
  8. Move simulation

The board is ENTIRELY drawn using Graphics

All positions have also now been changed to use a single value between 64, which corresponds to a 1ul<<pos on the bitboards. This made it very easy to display piece positions on the board.

You can import any FEN for any position which will be processed by the chess engine. Positions that cannot be replicated in-game WILL NOT be processed properly.

Example import image

Example impossible import image

This position could not have been reached without the king putting itself into check at some point. For move generation efficiency, positions like this cannot be analyzed correctly. There is currently no invalid detection system in place