From d25f15bd0425f2cfcdc67bb9033ab467a9fae8e5 Mon Sep 17 00:00:00 2001 From: Alice Date: Fri, 15 May 2026 20:58:17 +0300 Subject: [PATCH] version 5, updated --- .vscode/launch.json | 14 ++++++++++++++ Project/index.html | 4 ++-- Project/main.js | 8 ++------ Project/style.css | 6 ++---- 4 files changed, 20 insertions(+), 12 deletions(-) create mode 100644 .vscode/launch.json diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..7c0cddb --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,14 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "chrome", + "request": "launch", + "name": "Open index.html", + "file": "c:\\Users\\Dream\\games\\Project\\index.html" + } + ] +} \ No newline at end of file diff --git a/Project/index.html b/Project/index.html index 07fcb5a..a62bbd4 100644 --- a/Project/index.html +++ b/Project/index.html @@ -8,10 +8,10 @@

Вас приветствует игра "Камень, Ножницы, Бумага"

-
+
- +
diff --git a/Project/main.js b/Project/main.js index 69a075b..18df36d 100644 --- a/Project/main.js +++ b/Project/main.js @@ -27,12 +27,9 @@ const Paper = { num: 1, Name: 'бумага' }; function game(hum) { - document.getElementById("result-img").src = ""; - let npc = Math.floor(Math.random() * 3) + 1; - document.getElementById("player-img").src = "img/" + images[hum] + ".png"; - + document.getElementById("hum-img").src = "img/" + images[hum] + ".png"; document.getElementById("npc-img").src = "img/" + images[npc] + ".png"; if (npc === 1 && hum === 3) { @@ -66,5 +63,4 @@ function game(hum) { } -updateScore(); -console.log("wins-" + stats.wins + ",looses-" + stats.looses + ",draws-" + stats.draws); +console.log("wins-" + stats.wins + ",looses-" + stats.looses + ",draws-" + stats.draws); \ No newline at end of file diff --git a/Project/style.css b/Project/style.css index 97cd4cc..ad82661 100644 --- a/Project/style.css +++ b/Project/style.css @@ -8,13 +8,12 @@ h1 { } -.game-board { +.main { display: flex; - justify-content: space-between; align-items: center; width: 600px; - margin: 20px auto; + margin: auto; } .box { @@ -46,7 +45,6 @@ h1 { .card-imgs { display: flex; - flex-direction: row; justify-content: center; gap: 20px; } \ No newline at end of file