From 84dd56614d791968e3b91fdfd5a75e868c5155fd Mon Sep 17 00:00:00 2001
From: Sulagna Dutta Roy <72568715+Sulagna-Dutta-Roy@users.noreply.github.com>
Date: Sat, 6 Jul 2024 00:54:41 +0530
Subject: [PATCH] Delete Crack code/your files directory
---
Crack code/your files/index.html | 83 -------------------
Crack code/your files/manifest.json | 15 ----
Crack code/your files/script.js | 115 ---------------------------
Crack code/your files/style.css | 118 ----------------------------
4 files changed, 331 deletions(-)
delete mode 100644 Crack code/your files/index.html
delete mode 100644 Crack code/your files/manifest.json
delete mode 100644 Crack code/your files/script.js
delete mode 100644 Crack code/your files/style.css
diff --git a/Crack code/your files/index.html b/Crack code/your files/index.html
deleted file mode 100644
index ce88a6d9..00000000
--- a/Crack code/your files/index.html
+++ /dev/null
@@ -1,83 +0,0 @@
-
-
-
-
-
-
-
-
-
-
- Code Cracker
-
-
-
-
-
-
-
-
-
Code Cracker
-
- Created By Avdhesh Varshney
-
-
-
-
-
-
-
-
-
-
-
-
-
-
Rules :
-
- -
- Each guess must consist of 4 numberic characters.
-
- -
- Numbers may be used more than once!
-
- -
- You win only if your guess is an exact match.
-
- -
- You lose if you fail to guess the code under 10 guesses.
-
- -
- 'Y' Indicates a number is in the correct position.
-
- -
- 'E' Indicates a number is part of the code, but not in the right position.
-
- -
- 'E' Doesn't consider how many times a number exists in the code.
-
- -
- 'X' Indicates a number is not part of the code.
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Crack code/your files/manifest.json b/Crack code/your files/manifest.json
deleted file mode 100644
index 381c88ee..00000000
--- a/Crack code/your files/manifest.json
+++ /dev/null
@@ -1,15 +0,0 @@
-{
- "manifest_version": 3,
- "name": "Crack Code",
- "description": "Crack the code with the hints given to you and according to the rules and enjoy the game",
- "browser_action":{
- "default_popup":"index.html"
- },
- "background": {
- "service_worker": "script.js",
- "styles" : "style.css"
- },
- "permissions":["activeTab"]
-
-}
-
\ No newline at end of file
diff --git a/Crack code/your files/script.js b/Crack code/your files/script.js
deleted file mode 100644
index d74a7f45..00000000
--- a/Crack code/your files/script.js
+++ /dev/null
@@ -1,115 +0,0 @@
-var secret_code = generateCode();
-var step_counter = 0;
-var show = document.getElementById('show');
-var ans = document.getElementById('code');
-
-document.getElementById("submit").addEventListener("click", getInput);
-
-document.addEventListener('keypress', (e) => {
- if (e.key === 'Enter') {
- getInput();
- }
-});
-
-function getInput() {
- var x = document.getElementById('i_p').value;
- var o_p = document.getElementById("o_p");
- o_p.innerHTML = x;
- processInput(x);
-}
-
-function processInput(input) {
- var n = input.length;
- if (document.getElementById("submit").innerHTML === "Reset") {
- cleanAll();
- }
- else if (n > 4) {
- o_p.innerHTML = "Input exceeds 4 character!";
- }
- else if (n < 4) {
- o_p.innerHTML = "Input is less than 4 character!";
- }
- else if (step_counter === 10) {
- document.getElementById("is_game").innerHTML = "Fool, You Loose! Eat some Horlics!";
-
- show.style.display = '';
- show.addEventListener('click', () => {
- ans.style.display = '';
- show.style.display = 'none';
- });
- resetGame();
- }
- else {
- step_counter++;
- checkSubmission(input);
- }
-
- return;
-}
-
-function generateCode() {
- var code = "";
- for (var i = 0; i < 4; i++) {
- var n = getRandomIntInclusive(0, 9);
- code += n.toString();
- }
- document.getElementById("code").innerHTML = code;
- return code;
-}
-
-function getRandomIntInclusive(min, max) {
- min = Math.ceil(min);
- max = Math.floor(max);
- return Math.floor(Math.random() * (max - min + 1)) + min;
-}
-
-function checkSubmission(usr_input) {
- if (usr_input === secret_code) {
- document.getElementById("is_game").innerHTML = "Good guess! You win!!";
- resetGame();
- }
- var result = "";
-
- for (var i = 0; i < 4; i++) {
- var found = false;
- if (usr_input[i] === secret_code[i]) {
- result += "Y ";
- found = true;
- continue;
- }
- for (var j = 0; j < 4; j++) {
- if (usr_input[i] === secret_code[j]) {
- result += "E ";
- found = true;
- break;
- }
- }
- if (!found) {
- result += "X ";
- }
- }
- document.getElementById("check").innerHTML = result;
- showSubmission(result, usr_input);
- return;
-}
-function showSubmission(result, usr_input) {
- var ul = document.getElementById("step");
- var li = document.createElement("li");
- li.appendChild(document.createTextNode(usr_input + " >>> " + result));
- ul.appendChild(li);
-}
-
-function resetGame() {
- document.getElementById("submit").innerHTML = "Reset";
-}
-
-function cleanAll() {
- secret_code = generateCode();
- step_counter = 0;
- document.getElementById("step").innerHTML = "Guess Result"
- document.getElementById("submit").innerHTML = "Submit";
- show.style.display = 'none';
- ans.style.display = 'none';
- document.getElementById('is_game').innerHTML = '';
- return;
-}
diff --git a/Crack code/your files/style.css b/Crack code/your files/style.css
deleted file mode 100644
index de9eb150..00000000
--- a/Crack code/your files/style.css
+++ /dev/null
@@ -1,118 +0,0 @@
-* {
- margin: 0;
- padding: 0;
- box-sizing: border-box;
- text-decoration: none;
- user-select: none;
-}
-
-body {
- background-color: aquamarine;
-}
-
-#step {
- list-style: none;
-}
-
-.game {
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- background-color: rgba(red, green, blue, 0.3);
- box-shadow: 0 0 100px 0 black;
- border-radius: 1rem;
- width: 90vh;
- height: 90vh;
- padding: 1rem;
- text-align: center;
- display: flex;
- flex-direction: column;
- justify-content: center;
- align-items: center;
- transition: all 0.4s;
-}
-
-h1 {
- font-size: 2.5rem;
- margin-bottom: 5px;
- font-weight: 500;
- font-family: cursive;
- color: chocolate;
-}
-
-.input-section,
-.output-section,
-.result-section,
-#rules {
- margin: 5px 0;
-}
-
-.input-section input {
- padding: 5px;
- outline: none;
- border: none;
- text-align: center;
- border-radius: 10px;
- font-size: 1.2rem;
-}
-
-.input-section input:hover {
- box-shadow: 0 2px 50px 0 lightseagreen;
-}
-
-.input-section button {
- padding: 10px;
- font-size: 1rem;
- border-radius: 10px;
- outline: none;
- border: none;
- text-transform: uppercase;
- background-color: aqua;
- box-shadow: 0 2px 10px black;
- transition: all 0.2s;
-}
-
-.input-section button:hover {
- box-shadow: 0 0 25px 0 black;
- background-color: black;
- color: white;
-}
-
-.output-section p {
- font-size: 1.2rem;
- margin: 2px 0;
- font-weight: 700;
- text-transform: uppercase;
- letter-spacing: 2px;
-}
-
-.output-section #code {
- color: lightcoral;
-}
-
-.result-section {
- margin: 5px 0;
- letter-spacing: 2px;
- list-style: none;
-}
-
-#rules ul {
- list-style: none;
- letter-spacing: 1px;
-}
-
-.developer {
- font-size: 1.2rem;
- color: #313136;
- margin-bottom: 10px;
-}
-
-.developer a {
- text-decoration: none;
- color: #313136;
-}
-
-.developer a:hover {
- text-decoration: underline;
-}
\ No newline at end of file