Skip to content

Commit

Permalink
fix(chessboard): change default colors for board
Browse files Browse the repository at this point in the history
  • Loading branch information
willb335 committed Jun 27, 2018
1 parent ac59dc0 commit 49a9f47
Show file tree
Hide file tree
Showing 12 changed files with 15 additions and 16 deletions.
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
<div align="center" markdown="1">

<img src="./src/img/opposition.png" alt="opposition" width="200">
<img src="./src/img/ruyLopez.png" alt="ruyLopez" width="200">
<img src="./src/img/carlsen2016Championship.png" alt="carlsen2016Championship" width="200">
<img src="./src/img/anandsImmortal.png" alt="anandsImmortal" width="200">
<img src="./src/img/lucena.png" alt="lucena position" width="200">
<img src="./src/img/carlsenWorldChampionship2016.png" alt="Carlsen 2016 Championship" width="200">
<img src="./src/img/sicilian.png" alt="sicilian defense" width="200">

**A chessboard for React inspired by [chessboard.js](https://github.com/oakmac/chessboardjs)**

Expand Down
8 changes: 4 additions & 4 deletions src/Chessboard/Square.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@ class Square extends Component {
}
}

componentWillUnmount() {
const { square } = this.props;
this[square].remove();
}
// componentWillUnmount() {
// const { square } = this.props;
// this[square].remove();
// }

render() {
const {
Expand Down
4 changes: 2 additions & 2 deletions src/Chessboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ class Chessboard extends Component {
id: '0',
renderPieces,
pieces: {},
lightSquareStyle: { backgroundColor: '#61dafb' },
darkSquareStyle: { backgroundColor: '#10a8c8' },
lightSquareStyle: { backgroundColor: 'rgb(240, 217, 181)' },
darkSquareStyle: { backgroundColor: 'rgb(181, 136, 99)' },
roughSquare: false,
selectedSquares: [],
onMouseOverSquare: false,
Expand Down
10 changes: 5 additions & 5 deletions src/Demo.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ class Demo extends Component {
selectedSquares,
onDrop,
onMouseOverSquare,
onMouseOutSquare,
getPosition,
darkSquareStyle
onMouseOutSquare
// getPosition
// darkSquareStyle
}) => (
<Chessboard
id="humanVsHuman"
Expand All @@ -61,8 +61,8 @@ class Demo extends Component {
roughSquare={roughSquare}
animationOnDrop="rubberBand"
boardStyle={boardStyle}
getPosition={getPosition}
darkSquareStyle={darkSquareStyle}
// getPosition={getPosition}
// darkSquareStyle={darkSquareStyle}
/>
)}
</HumanVsHuman>
Expand Down
Binary file removed src/img/anandsImmortal.png
Binary file not shown.
Binary file removed src/img/carlsen2016Championship.png
Binary file not shown.
Binary file added src/img/carlsenWorldChampionship2016.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/img/lucena.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed src/img/opposition.png
Binary file not shown.
Binary file removed src/img/ruyLopez.png
Binary file not shown.
Binary file added src/img/sicilian.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion src/integrations/customRough.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ export const roughSquare = (element, squareWidth) => {
let rc = rough.svg(element);
const chessSquare = rc.rectangle(0, 0, squareWidth, squareWidth, {
roughness: 0.8,
fill: '#61dafb',
fill: '#b58863',
bowing: 2
});
element.appendChild(chessSquare);
Expand Down

0 comments on commit 49a9f47

Please sign in to comment.