From ee354fe80acadc0a8df5c34ed916b895fa10fb12 Mon Sep 17 00:00:00 2001 From: amanjain1644 Date: Fri, 12 Jul 2024 13:07:51 +0530 Subject: pawn move added --- .vscode/settings.json | 3 +++ app.js | 14 ++++++++++++++ index.css | 27 ++++++++++++++++++++------- index.html | 13 +++++++++++++ pawns_move.js | 7 +++++++ 5 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 .vscode/settings.json create mode 100644 pawns_move.js diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..6f3a291 --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "liveServer.settings.port": 5501 +} \ No newline at end of file diff --git a/app.js b/app.js index ebf0afc..7437c72 100644 --- a/app.js +++ b/app.js @@ -1,17 +1,31 @@ let board = [ +<<<<<<< Updated upstream [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], +======= + [0, 1, 0, 0, 0, 0, 0, 0], + [1, 1, 0, 0, 0, 0, 0, 0], + [0, 0, 1, 1, 1, 0, 0, 0], + [0, 0, 1, 2, 1, 0, 0, 0], + [0, 0, 1, 1, 1, 0, 0, 0], +>>>>>>> Stashed changes [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0], ] +<<<<<<< Updated upstream console.log(amelia_move(board, 7, 7)) +======= +console.log(board.length) + +console.log(amelia_move(board, 0,0)) +>>>>>>> Stashed changes function pawn_move(board, y, x) { let moves = [] diff --git a/index.css b/index.css index 271e489..f9e40ae 100644 --- a/index.css +++ b/index.css @@ -1,13 +1,25 @@ +*{ + font-size: 30px; + margin: 0; + padding: 0; +} + .white{ background-color: antiquewhite; - height: 100px; - width: 100px; + height: 76px; + width: 76px; + display: flex; + justify-content: center; + align-items: center; } .black{ - height: 100px; - width: 100px; - background-color: brown; + height: 76px; + width: 76px; + background-color: brown; + display: flex; + justify-content: center; + align-items: center; } body{ @@ -16,11 +28,12 @@ body{ display: flex; justify-content: center; align-items: center; + margin: 1px; } .chess-board{ - width: 800px; - height: 800px; + width: 608px; + height: 608px; display: grid; grid-template-columns:repeat(8,1fr); grid-template-rows:repeat(8,1fr); diff --git a/index.html b/index.html index 1ea90b2..28b1362 100644 --- a/index.html +++ b/index.html @@ -10,7 +10,20 @@
+<<<<<<< Updated upstream
+======= +
R
+
P
+
+
+
+
+
+
R
+
+
+>>>>>>> Stashed changes
diff --git a/pawns_move.js b/pawns_move.js new file mode 100644 index 0000000..f304608 --- /dev/null +++ b/pawns_move.js @@ -0,0 +1,7 @@ +function pawn_move(board, y, x){ + let moves =[]; + // * if pawn at row 1 or at row 6 it has to choice + if(x-1 && y-1){ + moves.push() + } +} \ No newline at end of file -- cgit v1.2.3