diff options
-rw-r--r-- | .vscode/settings.json | 3 | ||||
-rw-r--r-- | app.js | 14 | ||||
-rw-r--r-- | index.css | 27 | ||||
-rw-r--r-- | index.html | 13 | ||||
-rw-r--r-- | pawns_move.js | 7 |
5 files changed, 57 insertions, 7 deletions
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 @@ -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 = [] @@ -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); @@ -10,7 +10,20 @@ <body> <div class="chess-board"> <div> +<<<<<<< Updated upstream <div id="a8" class="1 white"></div> +======= + <div id="a8" class="1 white">R</div> + <div id="b8" class="2 black">P</div> + <div id="c8" class="3 white"></div> + <div id="d8" class="4 black"></div> + <div id="e8" class="5 white"></div> + <div id="f8" class="6 black"></div> + <div id="g8" class="7 white"></div> + <div id="h8" class="8 black">R</div> + </div> + <div> +>>>>>>> Stashed changes <div id="a7" class="2 black"></div> <div id="a6" class="3 white"></div> <div id="a5" class="4 black"></div> 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<board.length && x >-1 && y<board.length && y>-1){ + moves.push() + } +}
\ No newline at end of file |