chore: Run prettier
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Ashhhleyyy 2022-07-05 10:48:28 +01:00
parent 40aa200cbb
commit c9dfebb6a7
Signed by: ash
GPG key ID: 83B789081A0878FB
2 changed files with 15 additions and 5 deletions

View file

@ -6,6 +6,7 @@
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview",
"format": "prettier --write .",
"format:check": "prettier --check ."
},
"dependencies": {

View file

@ -113,7 +113,7 @@ const Board: FC<Props> = (props) => {
const gameResult = useMemo(() => {
if (validMoves.length === 0) {
const checked = isChecked(currentState)
const checked = isChecked(currentState);
return checked[sideToMove] ? 'checkmate' : 'stalemate';
}
return false;
@ -188,10 +188,19 @@ const Board: FC<Props> = (props) => {
<Files />
</div>
{gameResult && <div>
{gameResult === 'checkmate' && <h1>Checkmate! Winner: {otherSide(sideToMove)}!</h1>}
{gameResult === 'stalemate' && <h1>Stalemate! There are no legal moves {sideToMove} can make :/</h1>}
</div>}
{gameResult && (
<div>
{gameResult === 'checkmate' && (
<h1>Checkmate! Winner: {otherSide(sideToMove)}!</h1>
)}
{gameResult === 'stalemate' && (
<h1>
Stalemate! There are no legal moves {sideToMove} can
make :/
</h1>
)}
</div>
)}
{promotionMove && (
<div>