From 59ff9624d18155f617a3285972506cb708a1959e Mon Sep 17 00:00:00 2001 From: Alice <2+alice@noreply.gitea.kapka.ru> Date: Wed, 13 May 2026 16:48:20 +0300 Subject: [PATCH] revert 40e0a7027a037e3a75963800f409d266806d6abb revert revert 18b991048f7b238579dc2e826a4300d4188027cd revert revert ff1820d582ac674ebdf9c50d8c9f92c202440548 revert "Project Rock,Scissors,Paper" version 1 Signed-off-by: Alice --- .vscode/launch.json | 11 ++++- Project_Rock,Scissors,Paper/main.js | 60 ------------------------ Project_Rock,Scissors,Paper/starter.html | 9 ---- 3 files changed, 9 insertions(+), 71 deletions(-) delete mode 100644 Project_Rock,Scissors,Paper/main.js delete mode 100644 Project_Rock,Scissors,Paper/starter.html diff --git a/.vscode/launch.json b/.vscode/launch.json index 35e4d28..b2846d8 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,11 +4,18 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ + { + "name": "Launch Chrome", + "request": "launch", + "type": "chrome", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + }, { "type": "chrome", "request": "launch", - "name": "Open starter.html", - "file": "c:\\Users\\Dream\\JavaScript\\Project_Rock,Scissors,Paper\\starter.html" + "name": "Open javaScriptTester.html", + "file": "c:\\Users\\Dream\\JavaScript\\6\\javaScriptTester.html" } ] } \ No newline at end of file diff --git a/Project_Rock,Scissors,Paper/main.js b/Project_Rock,Scissors,Paper/main.js deleted file mode 100644 index add5883..0000000 --- a/Project_Rock,Scissors,Paper/main.js +++ /dev/null @@ -1,60 +0,0 @@ -let hum = prompt('Выберите "камень", "ножницы" или "бумага"'); -let npc = Math.floor(Math.random() * 3)+1; - -let stats = JSON.parse(localStorage.getItem("stats")); - -if (!stats) { - stats = { - wins: 0, - looses: 0, - draws: 0 - }; -} - -function save() { - localStorage.setItem("stats", JSON.stringify(stats)); -} - -console.log(npc); -console.log(hum); - -const Stone = { num: 3, Name: 'камень'}; -const Scissors = { num: 2, Name: 'ножницы'}; -const Paper = { num: 1, Name: 'бумага'}; - - -if (hum === Stone.Name){ - hum = Stone.num; -} else if (hum === Scissors.Name) { - hum = Scissors.num; -} else if (hum === Paper.Name) { - hum = Paper.num; -}; - - -if (npc === 1 && hum === 3) { - npc = 4 -} -if (npc === 3 && hum === 1) { - hum = 4 -} - -if (npc > hum) { - console.log("Вы проиграли"); - alert("Вы проиграли"); - stats.looses++; - save() -} else if (npc === hum) { - console.log("Ничья"); - alert("Ничья"); - stats.draws++; - save() -} else if (npc < hum) { - console.log("Вы выиграли"); - alert("Вы выиграли"); - stats.wins++; - save() -} else { - console.log("Пользователь написал какую-то фигню"); -} -console.log("Ваши победы - " + stats.wins + ",Ваши проигрыши - " + stats.looses + ",Ваши ничьи - " + stats.draws); \ No newline at end of file diff --git a/Project_Rock,Scissors,Paper/starter.html b/Project_Rock,Scissors,Paper/starter.html deleted file mode 100644 index 5948560..0000000 --- a/Project_Rock,Scissors,Paper/starter.html +++ /dev/null @@ -1,9 +0,0 @@ - - - Игрульки - - -

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

- - - \ No newline at end of file