Skip to content

Commit

Permalink
fix(app): add missing file
Browse files Browse the repository at this point in the history
  • Loading branch information
cholazzzb committed Dec 30, 2023
1 parent 8579c95 commit 87d94af
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions src/app/projects/ai-halma/component/Piece.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import { Square } from 'src/domains/projects/ai-halma/AIHalmaEntity';
import { cva } from 'src/styled-system/css';
import { Flex } from 'src/styled-system/jsx';
import { colorTheme } from 'src/theme';

const pieceCVA = cva({
base: {
display: 'inline-block',
width: '20px',
height: '20px',
borderRadius: '50%',
},
variants: {
kind: colorTheme,
},
defaultVariants: {
kind: 0,
},
});

export function Piece({ enable, piece }: { enable: boolean; piece: Square }) {
const cursor = enable ? 'pointer' : 'not-allowed';
return <Flex className={pieceCVA({ kind: piece })} cursor={cursor} />;
}
2 changes: 1 addition & 1 deletion src/app/projects/ai-halma/game/components/Square.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import {
InitialPositionKey,
MoveQueue,
PlayerIdx,
Position
Position,
} from 'src/domains/projects/ai-halma/AIHalmaEntity';
import { convertMoveToMovesQueue } from 'src/domains/projects/ai-halma/AIHalmaLogic';
import { Flex } from 'src/styled-system/jsx';
Expand Down

0 comments on commit 87d94af

Please sign in to comment.