diff --git a/public/black_bishop.png b/public/black_bishop.png deleted file mode 100644 index 89a4628..0000000 Binary files a/public/black_bishop.png and /dev/null differ diff --git a/public/black_bishop.svg b/public/black_bishop.svg new file mode 100644 index 0000000..eda1c36 --- /dev/null +++ b/public/black_bishop.svg @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/public/black_king.png b/public/black_king.png deleted file mode 100644 index 5a23105..0000000 Binary files a/public/black_king.png and /dev/null differ diff --git a/public/black_king.svg b/public/black_king.svg new file mode 100644 index 0000000..cc276a5 --- /dev/null +++ b/public/black_king.svg @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/public/black_knight.png b/public/black_knight.png deleted file mode 100644 index 009f43d..0000000 Binary files a/public/black_knight.png and /dev/null differ diff --git a/public/black_knight.svg b/public/black_knight.svg new file mode 100644 index 0000000..4c50b31 --- /dev/null +++ b/public/black_knight.svg @@ -0,0 +1,11 @@ + + + \ No newline at end of file diff --git a/public/black_pawn.png b/public/black_pawn.png deleted file mode 100644 index c597a8f..0000000 Binary files a/public/black_pawn.png and /dev/null differ diff --git a/public/black_pawn.svg b/public/black_pawn.svg new file mode 100644 index 0000000..5cafbdf --- /dev/null +++ b/public/black_pawn.svg @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/public/black_queen.png b/public/black_queen.png deleted file mode 100644 index fa7121a..0000000 Binary files a/public/black_queen.png and /dev/null differ diff --git a/public/black_queen.svg b/public/black_queen.svg new file mode 100644 index 0000000..d13708f --- /dev/null +++ b/public/black_queen.svg @@ -0,0 +1,20 @@ + + + \ No newline at end of file diff --git a/public/black_rook.png b/public/black_rook.png deleted file mode 100644 index ca16e6b..0000000 Binary files a/public/black_rook.png and /dev/null differ diff --git a/public/black_rook.svg b/public/black_rook.svg new file mode 100644 index 0000000..c5a1936 --- /dev/null +++ b/public/black_rook.svg @@ -0,0 +1,17 @@ + + + \ No newline at end of file diff --git a/public/logo192.png b/public/logo192.png deleted file mode 100644 index fc44b0a..0000000 Binary files a/public/logo192.png and /dev/null differ diff --git a/public/logo512.png b/public/logo512.png deleted file mode 100644 index a4e47a6..0000000 Binary files a/public/logo512.png and /dev/null differ diff --git a/public/white_bishop.png b/public/white_bishop.png deleted file mode 100644 index 2b6aae8..0000000 Binary files a/public/white_bishop.png and /dev/null differ diff --git a/public/white_bishop.svg b/public/white_bishop.svg new file mode 100644 index 0000000..bed03b0 --- /dev/null +++ b/public/white_bishop.svg @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/public/white_king.png b/public/white_king.png deleted file mode 100644 index 513ac42..0000000 Binary files a/public/white_king.png and /dev/null differ diff --git a/public/white_king.svg b/public/white_king.svg new file mode 100644 index 0000000..16f96e4 --- /dev/null +++ b/public/white_king.svg @@ -0,0 +1,13 @@ + + + \ No newline at end of file diff --git a/public/white_knight.png b/public/white_knight.png deleted file mode 100644 index 433b989..0000000 Binary files a/public/white_knight.png and /dev/null differ diff --git a/public/white_knight.svg b/public/white_knight.svg new file mode 100644 index 0000000..58c4dab --- /dev/null +++ b/public/white_knight.svg @@ -0,0 +1,10 @@ + + + \ No newline at end of file diff --git a/public/white_pawn.png b/public/white_pawn.png deleted file mode 100644 index bf78a95..0000000 Binary files a/public/white_pawn.png and /dev/null differ diff --git a/public/white_pawn.svg b/public/white_pawn.svg new file mode 100644 index 0000000..35ffa02 --- /dev/null +++ b/public/white_pawn.svg @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/public/white_queen.png b/public/white_queen.png deleted file mode 100644 index ad10025..0000000 Binary files a/public/white_queen.png and /dev/null differ diff --git a/public/white_queen.svg b/public/white_queen.svg new file mode 100644 index 0000000..fd4dc9b --- /dev/null +++ b/public/white_queen.svg @@ -0,0 +1,15 @@ + + + \ No newline at end of file diff --git a/public/white_rook.png b/public/white_rook.png deleted file mode 100644 index 743648b..0000000 Binary files a/public/white_rook.png and /dev/null differ diff --git a/public/white_rook.svg b/public/white_rook.svg new file mode 100644 index 0000000..e94d4b0 --- /dev/null +++ b/public/white_rook.svg @@ -0,0 +1,13 @@ + + + \ No newline at end of file diff --git a/src/index.css b/src/index.css index f29dd1e..21e5a88 100644 --- a/src/index.css +++ b/src/index.css @@ -23,13 +23,13 @@ ol, ul { float: left; font-size: 24px; font-weight: bold; - line-height: 45px; - height: 45px; + line-height: 30px; + height: 11vw; margin-right: -1px; margin-top: -1px; padding: 0; text-align: center; - width: 45px; + width: 11vw; } .square:hover { @@ -47,11 +47,14 @@ ol, ul { } .game { +} + +.game-board { display: flex; - flex-direction: row; + justify-content: center; + align-items: center; } .game-info { margin-left: 20px; } - diff --git a/src/index.js b/src/index.js index b06b33d..cbe28d8 100644 --- a/src/index.js +++ b/src/index.js @@ -19,19 +19,19 @@ const Pieces = { }; const Images = [ - './white_pawn.png', - './white_rook.png', - './white_knight.png', - './white_bishop.png', - './white_queen.png', - './white_king.png', + './white_pawn.svg', + './white_rook.svg', + './white_knight.svg', + './white_bishop.svg', + './white_queen.svg', + './white_king.svg', - './black_pawn.png', - './black_rook.png', - './black_knight.png', - './black_bishop.png', - './black_queen.png', - './black_king.png', + './black_pawn.svg', + './black_rook.svg', + './black_knight.svg', + './black_bishop.svg', + './black_queen.svg', + './black_king.svg', ]; function isBlack(piece) { @@ -69,6 +69,7 @@ function isKing(piece) { function Square(props) { let bg = { backgroundImage: `url(${Images[props.value]})`, + backgroundSize: `11vw`, // backgroundColor: "lightblue", }; if (props.value != null) { @@ -380,11 +381,11 @@ class Board extends React.Component { const winner = calculateWinner(this.state.squares); let status = winner ? 'Winner: ' + winner : - 'Next player: ' + (this.state.blackIsNext ? 'Black' : 'White'); + (this.state.blackIsNext ? 'Black' : 'White') + "'s Turn"; var texttext = -