From 330030e87289e10d98a4f1c27c7f2bea2c151e8c Mon Sep 17 00:00:00 2001
From: 1911aditi <146438609+1911aditi@users.noreply.github.com>
Date: Mon, 15 Jul 2024 21:25:24 +0530
Subject: [PATCH 1/3] Add files via upload
---
Games/Shape Shifter/README.md | 49 +++++++++++++++++++++++++++
Games/Shape Shifter/index.html | 17 ++++++++++
Games/Shape Shifter/script.js | 60 ++++++++++++++++++++++++++++++++++
Games/Shape Shifter/styles.css | 34 +++++++++++++++++++
4 files changed, 160 insertions(+)
create mode 100644 Games/Shape Shifter/README.md
create mode 100644 Games/Shape Shifter/index.html
create mode 100644 Games/Shape Shifter/script.js
create mode 100644 Games/Shape Shifter/styles.css
diff --git a/Games/Shape Shifter/README.md b/Games/Shape Shifter/README.md
new file mode 100644
index 0000000000..6e1e759ff4
--- /dev/null
+++ b/Games/Shape Shifter/README.md
@@ -0,0 +1,49 @@
+# Shape Shifter Game
+
+Shape Shifter is an innovative and interactive game where players must click on a randomly appearing shape within a limited time frame. The shape changes in size, color, and position to increase the challenge.
+
+## Game Features
+
+- Randomly appearing shapes with varying sizes and colors
+- Scoreboard to track your progress
+- Simple and intuitive user interface
+- Responsive design
+
+## Technologies Used
+
+- HTML
+- CSS
+- JavaScript
+
+## How to Play
+
+1. Open the `index.html` file in your web browser.
+2. Click the "Start Game" button to begin.
+3. Click on the shape as quickly as possible to score points.
+4. The shape will move to a new random position every second.
+5. The game continues until you stop it or refresh the page.
+
+## Installation
+
+To run the game locally, follow these steps:
+
+1. Clone the repository:
+ ```bash
+ git clone https://github.com/your-username/shape-shifter-game.git
+ ```
+2. Navigate to the project directory:
+ ```bash
+ cd shape-shifter-game
+ ```
+3. Open `index.html` in your web browser:
+ ```bash
+ open index.html
+ ```
+
+## Project Structure
+
+```plaintext
+shape-shifter-game/
+├── index.html
+├── styles.css
+└── script.js
diff --git a/Games/Shape Shifter/index.html b/Games/Shape Shifter/index.html
new file mode 100644
index 0000000000..7a2c6576cb
--- /dev/null
+++ b/Games/Shape Shifter/index.html
@@ -0,0 +1,17 @@
+
+
+
+
+
+ Shape Shifter
+
+
+
+
+
+
Score: 0
+
Start Game
+
+
+
+
diff --git a/Games/Shape Shifter/script.js b/Games/Shape Shifter/script.js
new file mode 100644
index 0000000000..e9795b62f3
--- /dev/null
+++ b/Games/Shape Shifter/script.js
@@ -0,0 +1,60 @@
+// script.js
+
+document.addEventListener('DOMContentLoaded', (event) => {
+ const targetShape = document.getElementById('target-shape');
+ const scoreBoard = document.getElementById('score-board');
+ const startButton = document.getElementById('start-button');
+ let score = 0;
+ let gameInterval;
+
+ function getRandomPosition() {
+ const containerRect = document.body.getBoundingClientRect();
+ const x = Math.floor(Math.random() * (containerRect.width - 50));
+ const y = Math.floor(Math.random() * (containerRect.height - 50));
+ return { x, y };
+ }
+
+ function getRandomColor() {
+ const letters = '0123456789ABCDEF';
+ let color = '#';
+ for (let i = 0; i < 6; i++) {
+ color += letters[Math.floor(Math.random() * 16)];
+ }
+ return color;
+ }
+
+ function getRandomSize() {
+ return Math.floor(Math.random() * 50) + 30;
+ }
+
+ function moveShape() {
+ const { x, y } = getRandomPosition();
+ const color = getRandomColor();
+ const size = getRandomSize();
+ targetShape.style.left = `${x}px`;
+ targetShape.style.top = `${y}px`;
+ targetShape.style.backgroundColor = color;
+ targetShape.style.width = `${size}px`;
+ targetShape.style.height = `${size}px`;
+ }
+
+ function startGame() {
+ score = 0;
+ scoreBoard.innerText = `Score: ${score}`;
+ targetShape.style.display = 'block';
+ gameInterval = setInterval(moveShape, 1000);
+ }
+
+ function stopGame() {
+ clearInterval(gameInterval);
+ targetShape.style.display = 'none';
+ }
+
+ targetShape.addEventListener('click', () => {
+ score++;
+ scoreBoard.innerText = `Score: ${score}`;
+ moveShape();
+ });
+
+ startButton.addEventListener('click', startGame);
+});
diff --git a/Games/Shape Shifter/styles.css b/Games/Shape Shifter/styles.css
new file mode 100644
index 0000000000..33cb47a9e4
--- /dev/null
+++ b/Games/Shape Shifter/styles.css
@@ -0,0 +1,34 @@
+/* styles.css */
+
+body {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ height: 100vh;
+ background-color: #f0f0f0;
+ margin: 0;
+}
+
+.game-container {
+ text-align: center;
+}
+
+.shape {
+ width: 50px;
+ height: 50px;
+ position: absolute;
+ border-radius: 50%;
+ background-color: red;
+ cursor: pointer;
+}
+
+#score-board {
+ font-size: 24px;
+ margin-top: 20px;
+}
+
+#start-button {
+ margin-top: 20px;
+ padding: 10px 20px;
+ font-size: 16px;
+}
From 7c90fc1a79d54c64aa94894ba3d41093d72aa199 Mon Sep 17 00:00:00 2001
From: 1911aditi <146438609+1911aditi@users.noreply.github.com>
Date: Mon, 15 Jul 2024 21:27:33 +0530
Subject: [PATCH 2/3] Add files via upload
---
assets/images/shape shifter.png | Bin 0 -> 14859 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
create mode 100644 assets/images/shape shifter.png
diff --git a/assets/images/shape shifter.png b/assets/images/shape shifter.png
new file mode 100644
index 0000000000000000000000000000000000000000..98f4c5dd8212cf5b4daea4e7b906e45cc099db9c
GIT binary patch
literal 14859
zcmeHNcUaTsx2M;(*dijLfXrH}C__xyEBsU-Dk48b_J}4Gkg!+4FiNc;E9nrV%u33J
z#0Z2C1XKvAvJ6`SAttg%2qOtu+%SIk_uSk2|LuJqzR$zMH|JgFJ@5IPbKY~lY5%+d
zlKoQUODQQS*{fGYe-2Q`0n865=xpUN>%djlgOK(OH!C#wK>U;PyH`CT$GZ+
zp=5-2K9l_ZBJ7Gsq?FX*_U*q<$e|VANlBUge%0pUtytfsiKMW}=t4T%4Hwk)`lkzL
zdvJ&5=)rY==6-!%Z~n;PUONJS6iIzlUitjylUMk1`|8VA*{)w7rk23o#0`d
z6J}uSwP0(c78tDQ*e3qYvJo2jf=6wQy*tx|gU&2Gn8{R+3@iXlcbf|I6c{gX3e2VQ
z)>E|b`P1xWHY+0>dPCJxdUv;`9J~0~_*t-Pr*#Y7JW=TBX13P(f>qy1n6IA;@6j}V
zV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p^PzSb1cAz-E3aE(%p_#yU5t
zUE3Uet()IlmW=RLLj{ehdHKek^Oa;oP{PK~*va#&e?X^}lD;LJULZKaWfS$K1s=Zf
zJGnH_jwIjo)~1cA%TwFxz9n)IVo3lj$>_z_qQ(;34lUnV$dfKX(4+fVG6hf9a_fE6%xXG0--k^Pho;ifX4Am6
z`l;l%O$|;p+2i6_C~m8)fyzuq6&*K{-RWw(bO((?ob~k?*%QeTHIbSqzLZmc)M2A(N*gSIKhVp$pgPYUw11rXk
zi)|zms{P5C$qM-Mg(tEaF^_tsEubWI$%SFkS5>FCDJsl`F+79%_(_V9le4a@aASgk
zuQxE)v=(~4xw_^G8u`HfI)fEBKVX8c!Up}|O<-s-eUTX%JfbDql{
zC+hUi0$nuqiqByJ9lDzXUF+q>K{IeFlx7s|1Yg54`r*e-MpeC#?+uj5qQ8C_vyi3i$wqHK~p01MOE(xZ7%
zV3+W@*O<}%wJW+l?~dSFtrQOlMIIx4NZUzIRccxHqkO7nTG5O~MyY1i#PNT^W})t@!N~CnIftV2Hs89n9+go#ue*JJ
zu`|~BJAY$>?2nr%R9YCp>Pr|uD@GmP+BOMx8G!6-cm2&I-#gO}zF2uJ!+v*JjuhEv
z<<|QW=Vn8OVVcg+IQYiw?N4G)?RX8zi_{){z9jY~v0c#HcVPQa*#CI@?;Kd~L-hZbw@T-2!BYbYr+SSaY@64swl{1r
Imu~;?pBafdUH||9
literal 0
HcmV?d00001
From 1779ab5897c4197cb397f19bcacd80e4d191232c Mon Sep 17 00:00:00 2001
From: 1911aditi <146438609+1911aditi@users.noreply.github.com>
Date: Mon, 15 Jul 2024 23:54:12 +0530
Subject: [PATCH 3/3] Update README.md
---
README.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/README.md b/README.md
index fd48417567..e56d0e7544 100644
--- a/README.md
+++ b/README.md
@@ -360,6 +360,7 @@ This repository also provides one such platforms where contributers come over an
| [Dodge_the_Blocks](https://github.com/kunjgit/GameZone/tree/main/Games/Dodge_the_Blocks) |
| [Memory_Flip](https://github.com/kunjgit/GameZone/tree/main/Games/Memory_Flip) |
+| [Shape_Shifter](https://github.com/kunjgit/GameZone/tree/main/Games/Shape_Shifter) |
|[Town-Rise](https://github.com/kunjgit/GameZone/tree/main/Games/Town_Rise_Game)|
| [IKnowYou-Mind-Reading-Game](https://github.com/kunjgit/GameZone/tree/main/Games/IKnowYou-Mind-Reading-Game) |