Skip to content

Commit

Permalink
added reference for chess symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
AbhilashMadi committed Nov 19, 2023
1 parent e507238 commit ddd0632
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions react/src/machine-coding/chess-board/ChessBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { colorTile } from './utils';

const ChessBoard: FC = () => {
//instead of using an object here we can use Map too
//reference: https://qwerty.dev/chess-symbols-to-copy-and-paste
/**
* R - Rook
* N - Knight
Expand All @@ -16,7 +17,7 @@ const ChessBoard: FC = () => {
R: '♜',
N: '♞',
B: '♝',
Q: '♛',
Q: '♛',
K: '♚',
P: '♟',
r: '♖',
Expand All @@ -29,14 +30,7 @@ const ChessBoard: FC = () => {
};

const boardRows: string =
'RNBQKBNR' +
'PPPPPPPP' +
' ' +
' ' +
' ' +
' ' +
'pppppppp' +
'rnbqkbnr';
'RNBQKBNR' + 'PPPPPPPP' + ' ' + ' ' + ' ' + ' ' + 'pppppppp' + 'rnbqkbnr';

return (
<section className={styles.chess}>
Expand Down

0 comments on commit ddd0632

Please sign in to comment.