-
Notifications
You must be signed in to change notification settings - Fork 0
Closed
Description
Enhance the existing movePiece
method in src/core/Board.js
to handle piece properties and return relevant move information.
Acceptance Criteria:
- The
movePiece(fromIndex, toIndex)
method inBoard.js
is updated. - It correctly updates the
hasMoved
property of the moved piece (especially for King, Rook, and Pawn). - It returns an object containing details about the move, such as
from
,to
,pieceMoved
,pieceCaptured
(if any), andsuccess
status. - It should still prevent moves from empty squares or invalid indices.
- This method should be called by the
Game
class after input handling.