diff --git a/src/components/KnightsPuzzle.tsx b/src/components/KnightsPuzzle.tsx index 1bbca55..9780ae9 100644 --- a/src/components/KnightsPuzzle.tsx +++ b/src/components/KnightsPuzzle.tsx @@ -183,30 +183,51 @@ const KnightsPuzzle = ({ - {/* Yellow: Main interactive with controls */} - - -
-
- {board.map((row, rowIndex) => row.map((piece, colIndex) =>
handleSquareClick(rowIndex, colIndex)}> - {renderPiece(piece)} -
))} + {/* Interactive and Goal State side by side */} +
+ {/* Left: Interactive game */} + + +
+
+ {board.map((row, rowIndex) => row.map((piece, colIndex) =>
handleSquareClick(rowIndex, colIndex)}> + {renderPiece(piece)} +
))} +
+ + {/* Controls */} +
+ + +
- - {/* Controls */} -
- - + + + + {/* Right: Goal state */} + + +
+
+ {targetBoard.map((row, rowIndex) => row.map((piece, colIndex) =>
+ {renderPiece(piece)} +
))} +
+ + {/* Goal label */} +
+

Goal State

+
-
-
-
+ + +
{/* Purple: Initial and Target positions side by side */}