From b88e255429bac834a32f0090d29181c799d43ae9 Mon Sep 17 00:00:00 2001 From: Kevin Thomas Date: Mon, 4 Nov 2024 13:56:43 -0800 Subject: [PATCH] feat: add more chess assets and continue migration to tailwindcss --- public/assets/pieces/black king.svg | 12 +++ public/assets/pieces/black pawn.svg | 5 + public/assets/pieces/white king.svg | 9 ++ public/assets/pieces/white pawn.svg | 5 + src/components/Feedback/Feedback.tsx | 19 ---- .../GameplayInterface/GameplayInterface.tsx | 14 --- .../HandBrainPlayControls.tsx | 100 ++++++++++-------- src/components/MovePlot/MovePlot.tsx | 8 -- 8 files changed, 89 insertions(+), 83 deletions(-) create mode 100644 public/assets/pieces/black king.svg create mode 100644 public/assets/pieces/black pawn.svg create mode 100644 public/assets/pieces/white king.svg create mode 100644 public/assets/pieces/white pawn.svg diff --git a/public/assets/pieces/black king.svg b/public/assets/pieces/black king.svg new file mode 100644 index 0000000..ba2ac9f --- /dev/null +++ b/public/assets/pieces/black king.svg @@ -0,0 +1,12 @@ + + + + + + + + + + + + diff --git a/public/assets/pieces/black pawn.svg b/public/assets/pieces/black pawn.svg new file mode 100644 index 0000000..b534de8 --- /dev/null +++ b/public/assets/pieces/black pawn.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/public/assets/pieces/white king.svg b/public/assets/pieces/white king.svg new file mode 100644 index 0000000..632ca1a --- /dev/null +++ b/public/assets/pieces/white king.svg @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/public/assets/pieces/white pawn.svg b/public/assets/pieces/white pawn.svg new file mode 100644 index 0000000..b265fe1 --- /dev/null +++ b/public/assets/pieces/white pawn.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/components/Feedback/Feedback.tsx b/src/components/Feedback/Feedback.tsx index 7c2cd30..82a1395 100644 --- a/src/components/Feedback/Feedback.tsx +++ b/src/components/Feedback/Feedback.tsx @@ -133,25 +133,6 @@ export const Feedback: React.FC = ({ )} )} - {/* */} ) diff --git a/src/components/GameplayInterface/GameplayInterface.tsx b/src/components/GameplayInterface/GameplayInterface.tsx index 128fb6f..5c454a2 100644 --- a/src/components/GameplayInterface/GameplayInterface.tsx +++ b/src/components/GameplayInterface/GameplayInterface.tsx @@ -189,20 +189,6 @@ export const GameplayInterface: React.FC = ( <>
- {/*
-
- -
-
-
*/}
{timeControl != 'unlimited' ? ( = ({ return (
-
+
{gameOver ? ( <> - {playAgain ? : null} + {playAgain ? ( + + ) : null} ) : ( - <> -

- {isBrain ? 'You are the brain' : 'You are the hand'} -

-

{status}

- +
+
+

{status}

+

+ {isBrain ? 'You are the brain' : 'You are the hand'} +

+
{isBrain ? ( -
+
{pieceTypes.map((p) => ( ))}
) : ( -
+
{selectedPiece ? ( -
+ ) : null}
)} - {offerDraw ? : null} - {resign ? : null} - + {offerDraw ? ( + + ) : null} + {resign ? ( + + ) : null} +
)}
diff --git a/src/components/MovePlot/MovePlot.tsx b/src/components/MovePlot/MovePlot.tsx index 4da3b07..3775963 100644 --- a/src/components/MovePlot/MovePlot.tsx +++ b/src/components/MovePlot/MovePlot.tsx @@ -113,14 +113,6 @@ export const MovePlot: React.FC = ({ onMouseMove={(event) => onMouseMove?.(node, event)} onMouseLeave={(event) => onMouseLeave?.(node, event)} onClick={(event) => onClick?.(node, event)} - // className={classNames({ - // [styles.animated]: - // (currentMove && - // currentMove.join('') === props.node.data.move) || - // (!currentMove && - // currentSquare && - // currentSquare === props.node.data.move.slice(0, 2)), - // })} /> ) }}