diff --git a/Games/Alien_Invasion/.DS_Store b/Games/Alien_Invasion/.DS_Store new file mode 100644 index 0000000000..74e30099e6 Binary files /dev/null and b/Games/Alien_Invasion/.DS_Store differ diff --git a/Games/Alien_Invasion/README..md b/Games/Alien_Invasion/README..md new file mode 100644 index 0000000000..17a09c4382 --- /dev/null +++ b/Games/Alien_Invasion/README..md @@ -0,0 +1,20 @@ +# AttackAlienInvaders Game App +A cool 2D alien planet exploration steampunk-themed game application with techniques of vanilla JavaScript, HTML5, CSS3 and HTML Canvas. From sprite animation to parallax backgrounds, the game App is completely built from scratch, with no frameworks or libraries, using HTML, CSS and plain vanilla JavaScript. The game contains richful premium art assets for characters, environments and props. + +### [Game Won Demo](https://github.com/KrystalZhang612/KrystalZhang-AttackAlienInvaders-Game-App/blob/main/testing-result-AttackAlienInvader-game-app/Won%20Game.mov): Most Wondrous! Well done explorer! +https://user-images.githubusercontent.com/72481348/198857930-95a5c040-1d47-4ca6-b5a6-15ac05e8e520.mov +### [Game Lost Demo](https://github.com/KrystalZhang612/KrystalZhang-AttackAlienInvaders-Game-App/blob/main/testing-result-AttackAlienInvader-game-app/Lost%20Game.mov): Blazed! Get my repair kit and try again! +https://user-images.githubusercontent.com/72481348/198857699-86d076d4-f746-435b-89ec-333ad1ba01b8.mov + +# Game Premiere Storyline +***Central Computer***:
+`These alien creatures have very similar physiology to the earth seahorses. Their bodies can easily cut through the thick atmosphere. They can move very fast.`
+***Explorer***:
+`Seahorses hives are being attacked by something. This one has been damaged. I wonder if you can hack into this creature’s central computer to control it for a while.`
+***Central Computer***:
+`It is surprisingly easy to override its circuits. Seems like these machines are not used by our technology. I’m getting a lot of new data.`
+***Central Computer***:
+`The atmosphere on this planet is thick enough to allow heavy silicon-based lifeforms to float but smoke is blocking most of the sunlight. Many creatures developed artificial lights and glowing appendages to see through the heavy clouds. The Seahorse sentinel has a basic attack that’s powerful against weak enemies, but if it absorbs energy from one of the overcharged creatures, it gets additional firepower for a short period of time and it instantly replenishes its ammo. Ammo also automatically recharges over time. It seems we just need to help it to get through these aggressive swarms in time so it can join its hive.` +- There is a stream of data about multiple different species. +- The alien creatures in the hood of their ecosystem have special movements, special abilities, and interact with the environments on other planets. + diff --git a/Games/Alien_Invasion/index.html b/Games/Alien_Invasion/index.html new file mode 100644 index 0000000000..760bb1af1b --- /dev/null +++ b/Games/Alien_Invasion/index.html @@ -0,0 +1,44 @@ + + + + + + + + AttackAlienInvader Game + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Games/Alien_Invasion/script.js b/Games/Alien_Invasion/script.js new file mode 100644 index 0000000000..5e50da0a0c --- /dev/null +++ b/Games/Alien_Invasion/script.js @@ -0,0 +1,543 @@ +window.addEventListener('load', function () { + //canvas setup + const canvas = document.getElementById('canvas1'); + const ctx = canvas.getContext('2d'); + canvas.width = 1000; + canvas.height = 500; + + class InputHandler { + constructor(game) { + this.game = game; + window.addEventListener('keydown', e => { + if (((e.key === 'ArrowUp') || + (e.key === 'ArrowDown') + ) && this.game.keys.indexOf(e.key) === - 1) { + this.game.keys.push(e.key); + } else if (e.key === ' ') { + this.game.player.shootTop(); + } else if (e.key === 'd') { + this.game.debug = !this.game.debug; + } + }); + window.addEventListener('keyup', e => { + if (this.game.keys.indexOf(e.key) > -1) { + this.game.keys.splice(this.game.keys.indexOf(e.key), 1); + } + }); + } + } + + class Projectile { + constructor(game, x, y) { + this.game = game; + this.x = x; + this.y = y; + this.width = 10; + this.height = 3; + this.speed = 3; + this.markedForDeletion = false; + this.image = document.getElementById('projectile'); + } + update() { + this.x += this.speed; + if (this.x > this.game.width * 0.8) this.markedForDeletion = true; + } + draw(context) { + context.drawImage(this.image, this.x, this.y); + } + } + + class Particle { + constructor(game, x, y) { + this.game = game; + this.x = x; + this.y = y; + this.image = document.getElementById('gears'); + this.frameX = Math.floor(Math.random() * 3); + this.frameY = Math.floor(Math.random() * 3); + this.spriteSize = 50; + this.sizeModifier = (Math.random() * 0.5 + 0.5).toFixed(1); + this.size = this.spriteSize * this.sizeModifier; + this.speedX = Math.random() * 6 - 3; + this.speedY = Math.random() * -15; + this.gravity = 0.5; + this.markedForDeletion = false; + this.angle = 0; + this.va = Math.random() * 0.2 - 0.1; + this.bounced = 0; + this.bottomBounceBoundary = Math.random() * 80 + 60; + } + update() { + this.angle += this.va; + this.speedY += this.gravity; + this.x -= this.speedX - this.game.speed; + this.y += this.speedY; + if (this.y > this.game.height + this.size || this.x < 0 - this.size) this.markedForDeletion = true; + if (this.y > this.game.height - this.bottomBounceBoundary && this.bounced < 5) { + this.bounced++; + this.speedY *= -0.7; + } + } + draw(context) { + context.save(); + context.translate(this.x, this.y); + context.rotate(this.angle); + context.drawImage(this.image, this.frameX * this.spriteSize, + this.frameY * this.spriteSize, this.spriteSize, this.spriteSize, this.size * -0.5, + this.size * -0.5, this.size, this.size); + context.restore(); + } + } + + class Player { + constructor(game) { + this.game = game; + this.width = 120; + this.height = 190; + this.x = 20; + this.y = 100; + this.frameX = 0; + this.frameY = 0; + this.maxFrame = 37; + this.speedY = 0; + this.maxSpeed = 3; + this.projectiles = []; + this.image = document.getElementById('player'); + this.powerUp = false; + this.powerUpTimer = 0; + this.powerUpLimit = 10000; + } + update(deltaTime) { + if (this.game.keys.includes('ArrowUp')) this.speedY = -this.maxSpeed; + else if (this.game.keys.includes('ArrowDown')) this.speedY = this.maxSpeed; + else this.speedY = 0; + this.y += this.speedY; + // vertical boundaries + if (this.y > this.game.height - this.height * 0.5) this.y = this.game.height - this.height * 0.5; + else if (this.y < -this.height * 0.5) this.y - this.height * 0.5; + //handle projectiles + this.projectiles.forEach(projectile => { + projectile.update(); + }); + this.projectiles = this.projectiles.filter(projectile => !projectile.markedForDeletion); + //sprite animation + if (this.frameX < this.maxFrame) { + this.frameX++; + } else { + this.frameX = 0; + } + // power up + if (this.powerUp) { + if (this.powerUpTimer > this.powerUpLimit) { + this.powerUpTimer = 0; + this.powerUp = false; + this.frameY = 0; + } else { + this.powerUpTimer += deltaTime; + this.frameY = 1; + this.game.ammo += 0.1; + } + } + } + draw(context) { + if (this.game.debug) context.strokeRect(this.x, this.y, this.width, this.height); + this.projectiles.forEach(projectile => { + projectile.draw(context); + }); + context.drawImage(this.image, this.frameX * this.width, this.frameY * this.height, this.width, this.height, this.x, this.y, this.width, this.height); + + } + shootTop() { + if (this.game.ammo > 0) { + this.projectiles.push(new Projectile(this.game, this.x + 80, this.y + 30)); + this.game.ammo--; + } + if (this.powerUp) this.shootBottom(); + } + shootBottom() { + if (this.game.ammo > 0) { + this.projectiles.push(new Projectile(this.game, this.x + 80, this.y + 175)); + } + } + + enterPowerUp() { + this.powerUpTimer = 0; + this.powerUp = true; + if (this.game.ammo < this.game.maxAmmo) this.game.ammo = this.game.maxAmmo; + } + } + class Enemy { + constructor(game) { + this.game = game; + this.x = this.game.width; + this.speedX = Math.random() * -1.5 - 0.5; + this.markedForDeletion = false; + this.frameX = 0; + this.frameY = 0; + this.maxFrame = 37; + } + update() { + this.x += this.speedX - this.game.speed; + if (this.x + this.width < 0) this.markedForDeletion = true; + // sprite animation + if (this.frameX < this.maxFrame) { + this.frameX++; + } else this.frameX = 0; + } + draw(context) { + if (this.game.debug) context.strokeRect(this.x, this.y, this.width, this.height); + context.drawImage(this.image, this.frameX * this.width, this.frameY * this.height, this.width, this.height, this.x, this.y, this.width, this.height); + if (this.game.debug) { + context.font = '20px Bangers'; + context.fillText(this.lives, this.x, this.y); + } + } + } + class Angler1 extends Enemy { + constructor(game) { + super(game); + this.width = 228; + this.height = 169; + this.y = Math.random() * (this.game.height * 0.95 - this.height); + this.image = document.getElementById('angler1'); + this.frameY = Math.floor(Math.random() * 3); + this.lives = 5; + this.score = this.lives; + } + + } + class Angler2 extends Enemy { + constructor(game) { + super(game); + this.width = 213; + this.height = 165; + this.y = Math.random() * (this.game.height * 0.95 - this.height); + this.image = document.getElementById('angler2'); + this.frameY = Math.floor(Math.random() * 2); + this.lives = 6; + this.score = this.lives; + } + + } + + class LuckyFish extends Enemy { + constructor(game) { + super(game); + this.width = 99; + this.height = 95; + this.y = Math.random() * (this.game.height * 0.95 - this.height); + this.image = document.getElementById('lucky'); + this.frameY = Math.floor(Math.random() * 2); + this.lives = 5; + this.score = 15; + this.type = 'lucky' + } + } + + class HiveWhale extends Enemy { + constructor(game) { + super(game); + this.width = 400; + this.height = 227; + this.y = Math.random() * (this.game.height * 0.95 - this.height); + this.image = document.getElementById('hivewhale'); + this.frameY = 0; + this.lives = 20; + this.score = this.lives; + this.type = 'hive'; + this.speedX = Math.random() * -1.2 - 0.2; + } + } + + class Drone extends Enemy { + constructor(game, x, y) { + super(game); + this.width = 115; + this.height = 95; + this.x = x; + this.y = y; + this.image = document.getElementById('drone'); + this.frameY = Math.floor(Math.random() * 2); + this.lives = 3; + this.score = this.lives; + this.type = 'drone'; + this.speedX = Math.random() * -4.2 - 0.5; + } + } + + + class Layer { + constructor(game, image, speedModifier) { + this.game = game; + this.image = image; + this.speedModifier = speedModifier; + this.width = 1768; + this.height = 500; + this.x = 0; + this.y = 0; + } + update() { + if (this.x <= -this.width) this.x = 0; + this.x -= this.game.speed * this.speedModifier; + } + draw(context) { + context.drawImage(this.image, this.x, this.y); + context.drawImage(this.image, this.x + this.width, this.y); + } + } + + class Background { + constructor(game) { + this.game = game; + this.image1 = document.getElementById('layer1'); + this.image2 = document.getElementById('layer2'); + this.image3 = document.getElementById('layer3'); + this.image4 = document.getElementById('layer4'); + this.layer1 = new Layer(this.game, this.image1, 0.2); + this.layer2 = new Layer(this.game, this.image2, 0.4); + this.layer3 = new Layer(this.game, this.image3, 1); + this.layer4 = new Layer(this.game, this.image4, 1.5); + this.layers = [this.layer1, this.layer2, this.layer3, this.layer4]; + } + update() { + this.layers.forEach(layer => layer.update()); + } + draw(context) { + this.layers.forEach(layer => layer.draw(context)); + } + + } + + class Explosion { + constructor(game, x, y) { + this.game = game; + this.frameX = 0; + this.spriteWidth = 200; + this.spriteHeight = 200; + this.width = this.spriteWidth; + this.height = this.spriteHeight; + this.x = x - this.width * 0.5; + this.y = y - this.height * 0.5; + this.fps = 30; + this.time = 0; + this.interval = 1000 / this.fps; + this.markedForDeletion = false; + this.maxFrame = 8; + } + update(deltaTime) { + this.x -= this.game.speed; + if (this.timer > this.interval) { + this.frameX++; + this.timer = 0; + } else { + this.timer += deltaTime; + } + if (this.frameX > this.maxFrame) this.markedForDeletion = true; + } + draw(context) { + context.drawImage(this.image, this.frameX * this.spriteWidth, 0, this.spriteWidth, + this.spriteHeight, this.x, this.y, this.width, this.height); + } + } + + class SmokeExplosion extends Explosion { + constructor(game, x, y) { + super(game, x, y); + this.image = document.getElementById('smokeExplosion'); + } + } + + class FireExplosion extends Explosion { + constructor(game, x, y) { + super(game, x, y); + this.image = document.getElementById('fireExplosion'); + } + } + + + class UI { + constructor(game) { + this.game = game; + this.fontSize = 25; + this.fontFamily = 'Bangers'; + this.color = 'yellow'; + } + draw(context) { + context.save(); + context.fillStyle = this.color; + context.shadowOffsetX = 2; + context.shadowOffsetY = 2; + context.shadowColor = 'black'; + context.font = this.fontSize + 'px' + this.fontFamily; + //score + context.font = '20px Bangers'; + context.fillText('Score: ' + this.game.score, 20, 40); + + //timer + const formattedTime = (this.game.gameTime * 0.001).toFixed(1); + context.font = '20px Bangers'; + context.fillText('Timer:' + formattedTime, 20, 100); + + //game over messages + if (this.game.gameOver) { + context.textAlign = 'center'; + let message1; + let message2; + if (this.game.score > this.game.winningScore) { + message1 = 'Most Wondrous!'; + message2 = 'Well Done explorer!'; + } else { + message1 = 'Blazes!'; + message2 = 'Get my repair kit and try again!'; + } + context.font = '50px Bangers'; + context.fillText(message1, this.game.width * 0.5, this.game.height * 0.5 - 20); + context.font = '25px Bangers'; + context.fillText(message2, this.game.width * 0.5, this.game.height * 0.5 + 20); + } + //ammo + if (this.game.player.powerUp) context.fillStyle = '#ffffbd'; + for (let i = 0; i < this.game.ammo; i++) { + context.fillRect(20 + 5 * i, 50, 3, 20); + } + context.restore(); + } + } + class Game { + constructor(width, height) { + this.width = width; + this.height = height; + this.background = new Background(this); + this.player = new Player(this); + this.input = new InputHandler(this); + this.ui = new UI(this); + this.keys = []; + this.enemies = []; + this.particles = []; + this.explosions = []; + this.enemyTimer = 0; + this.enemyInterval = 2000; + this.ammo = 20; + this.maxAmmo = 50; + this.ammoTimer = 0; + this.ammoInterval = 350; + this.gameOver = false; + this.score = 0; + this.winningScore = 80; + this.gameTime = 0; + this.timeLimit = 30000; + this.speed = 1; + this.debug = false; + + } + update(deltaTime) { + if (!this.gameOver) this.gameTime += deltaTime; + if (this.gameTime > this.timeLimit) this.gameOver = true; + this.background.update(); + this.background.layer4.update(); + this.player.update(deltaTime); + if (this.ammoTimer > this.ammoInterval) { + if (this.ammo < this.maxAmmo) this.ammo++; + this.ammoTimer = 0; + } else { + this.ammoTimer += deltaTime; + } + this.particles.forEach(particle => particle.update()); + this.particles = this.particles.filter(particle => !particle.markedForDeletion); + this.explosions.forEach(explosion => explosion.update(deltaTime)); + this.explosions = this.explosions.filter(explosion => !explosion.markedForDeletion); + this.enemies.forEach(enemy => { + enemy.update(); + if (this.checkCollision(this.player, enemy)) { + enemy.markedForDeletion = true; + this.addExplosion(enemy); + for (let i = 0; i < enemy.score; i++) { + this.particles.push(new Particle(this, enemy.x + enemy.width * 0.5, enemy.y + enemy.height * 0.5)); + } + if (enemy.type === 'lucky') this.player.enterPowerUp(); + else if (!this.gameOver) this.score--; + } + this.player.projectiles.forEach(projectile => { + if (this.checkCollision(projectile, enemy)) { + enemy.lives--; + projectile.markedForDeletion = true; + this.particles.push(new Particle(this, enemy.x + enemy.width * 0.5, enemy.y + enemy.height * 0.5)); + if (enemy.lives <= 0) { + for (let i = 0; i < enemy.score; i++) { + this.particles.push(new Particle(this, enemy.x + enemy.width * 0.5, enemy.y + enemy.height * 0.5)); + } + enemy.markedForDeletion = true; + this.addExplosion(enemy); + if (enemy.type === 'hive') { + for (let i = 0; i < 5; i++) { + this.enemies.push(new Drone(this, enemy.x + Math.random() * enemy.width, + enemy.y + Math.random() * enemy.height + 0.5)); + } + } + if (!this.gameOver) this.score += enemy.score; + /*if (this.score > this.winningScore) this.gameOver = true;*/ + } + } + }); + }); + this.enemies = this.enemies.filter(enemy => !enemy.markedForDeletion); + if (this.enemyTimer > this.enemyInterval && !this.gameOver) { + this.addEnemy(); + this.enemyTimer = 0; + } else { + this.enemyTimer += deltaTime; + } + } + draw(context) { + this.background.draw(context); + this.ui.draw(context); + this.player.draw(context); + this.particles.forEach(particle => particle.draw(context)); + this.enemies.forEach(enemy => { + enemy.draw(context); + }); + this.explosions.forEach(explosion => { + explosion.draw(context); + }); + this.background.layer4.draw(context); + } + addEnemy() { + const randomize = Math.random(); + if (randomize < 0.3) this.enemies.push(new Angler1(this)); + else if (randomize < 0.6) this.enemies.push(new Angler2(this)); + else if (randomize < 0.7) this.enemies.push(new HiveWhale(this)); + else this.enemies.push(new LuckyFish(this)); + } + addExplosion(enemy) { + const randomize = Math.random(); + if (randomize < 0.5) { + this.explosions.push(new SmokeExplosion(this, enemy.x + enemy.width * 0.5, enemy.y + enemy.height * 0.5)); + } + else { + this.explosions.push(new FireExplosion(this, enemy.x + enemy.width * 0.5, enemy.y + enemy.height * 0.5)); + } + } + checkCollision(rect1, rect2) { + return (rect1.x < rect2.x + rect2.width && + rect1.x + rect1.width > rect2.x && + rect1.y < rect2.y + rect2.height && + rect1.height + rect1.y > rect2.y) + } + + } + + const game = new Game(canvas.width, canvas.height); + let lastTime = 0; + //animation loop + function animate(timeStamp) { + const deltaTime = timeStamp - lastTime; + console.log(deltaTime); + lastTime = timeStamp; + ctx.clearRect(0, 0, canvas.width, canvas.height); + game.draw(ctx); + game.update(deltaTime); + requestAnimationFrame(animate); + } + animate(0); +}); + diff --git a/Games/Alien_Invasion/style.css b/Games/Alien_Invasion/style.css new file mode 100644 index 0000000000..268a5f3b93 --- /dev/null +++ b/Games/Alien_Invasion/style.css @@ -0,0 +1,34 @@ +* { + margin: 0; + padding: 0; + box-sizing: border-box; +} + +#canvas1 { + border: 5px solid black; + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + background: #4d79bc; + max-width: 100%; + max-height: 100%; + font-family: 'Bangers', cursive; +} + +#layer1, +#layer2, +#layer3, +#layer4, +#player, +#angler1, +#angler2, +#lucky, +#projectile, +#gears, +#hivewhale, +#drone, +#smokeExplosion, +#fireExplosion { + display: none; +} \ No newline at end of file diff --git a/Games/Fidget_Spinner_Game/README.md b/Games/Fidget_Spinner_Game/README.md new file mode 100644 index 0000000000..7f6afc0085 --- /dev/null +++ b/Games/Fidget_Spinner_Game/README.md @@ -0,0 +1,37 @@ +# Fidget Spinner + +A fidget spinner made in JavaScript. + +## Description 📃 + + Fidget Spinner is an interactive online simulation of a physical fidget spinner. This digital version allows users to experience the satisfying and stress-relieving sensation of spinning a fidget spinner directly from their browser. + +## Functionalities 🎮 + +- **Interactive Spinning**: Users can spin the fidget spinner by dragging the mouse across the screen. +- **Speed Display**: The current speed of the spinner is displayed, giving users real-time feedback. +- **Custom Speed Setting**: Users can set a custom speed for the fidget spinner, allowing for a personalized experience. +- **Automatic Spin**: For those who prefer not to drag their mouse, a button is available to automatically spin the fidget spinner. + +## How to Play? 🕹️ + +1. **Drag to Spin**: Click and drag the mouse across the spinner to make it spin. The faster you drag, the faster the spinner will rotate. +2. **View Speed**: Watch the speedometer to see how fast the spinner is going. +3. **Set Custom Speed**: Use the input box to set a custom speed for the spinner. +4. **Automatic Spin**: Click the "Spin" button to make the spinner spin without dragging. + +## Screenshots 📸 + +![Fidget Spinner](assets/images/Fidget.png) + + + +## Updates + +- **Speed Display**: Added for real-time feedback. +- **Custom Speed Setting**: Introduced a feature to set custom speed. +- **Automatic Spin**: Added a "Spin" button for automatic spinning. + + + +Enjoy the virtual spinning experience and have fun! diff --git a/Games/Fidget_Spinner_Game/assets/images/Fidget.png b/Games/Fidget_Spinner_Game/assets/images/Fidget.png new file mode 100644 index 0000000000..1f825166d8 Binary files /dev/null and b/Games/Fidget_Spinner_Game/assets/images/Fidget.png differ diff --git a/Games/Fidget_Spinner_Game/index.html b/Games/Fidget_Spinner_Game/index.html new file mode 100644 index 0000000000..3fbad5c860 --- /dev/null +++ b/Games/Fidget_Spinner_Game/index.html @@ -0,0 +1,26 @@ + + + + + Fidget Spinner + + + + + + + + + +Current Speed :
+
+ --------------------
+  
+ For Lazy People + + + + + + \ No newline at end of file diff --git a/Games/Fidget_Spinner_Game/index.js b/Games/Fidget_Spinner_Game/index.js new file mode 100644 index 0000000000..9542ea1904 --- /dev/null +++ b/Games/Fidget_Spinner_Game/index.js @@ -0,0 +1,103 @@ +'use strict'; + +var canvas = document.getElementById('canvas'); +var ctx = canvas.getContext('2d'); +var step = 2 * Math.PI / 360; +var radius = 120; + +var dragStart = false; +var angle = 0; +var speed = 7; +document.getElementById("svalue").innerHTML = speed; +ctx.strokeStyle = '#FA8072'; +ctx.lineWidth = radius / 5.5; + +function spin() { + speed = document.getElementById("svalue").innerHTML; +} + +function verifyorder() { + speed = document.getElementById('value').value; + document.getElementById("svalue").innerHTML = speed; +} + + + +canvas.addEventListener('mousedown', function (_ref) { + var clientX = _ref.clientX; + var clientY = _ref.clientY; + + dragStart = { clientX: clientX, clientY: clientY }; +}); +canvas.addEventListener('touchstart', function (_ref2) { + var originalEvent = _ref2.originalEvent; + + dragStart = { + clientX: originalEvent.touches[0].pageX, + clientY: originalEvent.touches[0].pageY + }; +}); +canvas.addEventListener('mousemove', function (_ref3) { + var clientX = _ref3.clientX; + var clientY = _ref3.clientY; + return dragStart && function () { + updateSpeed(dragStart, { clientX: clientX, clientY: clientY }); + dragStart = { clientX: clientX, clientY: clientY }; + }(); +}); +canvas.addEventListener('touchmove', function (_ref4) { + var originalEvent = _ref4.originalEvent; + return dragStart && function () { + updateSpeed(dragStart, { + clientX: originalEvent.touches[0].pageX, + clientY: originalEvent.touches[0].pageY + }); + dragStart = { + clientX: originalEvent.touches[0].pageX, + clientY: originalEvent.touches[0].pageY + }; + }(); +}); +window.addEventListener('mouseup', function () { + dragStart = false; +}); +window.addEventListener('touchend', function () { + dragStart = false; +}); + +function updateSpeed(startPos, endPos) { + speed = (Math.atan2(startPos.clientX - (canvas.offsetLeft + canvas.width / 2), startPos.clientY - (canvas.offsetTop + canvas.height / 2)) - Math.atan2(endPos.clientX - (canvas.offsetLeft + canvas.width / 2), endPos.clientY - (canvas.offsetTop + canvas.height / 2))) * radius; +} + +function render() { + ctx.clearRect(0, 0, canvas.width, canvas.height); + + angle += step * speed; + speed = Math.max(speed - 0.08, Math.min(speed + 0.08, 0)); + + for (var i = 0; i < 3; i++) { + var x = canvas.width / 2 + radius * Math.sin(angle + i * (120 * step)); + var y = canvas.height / 2 - radius * Math.cos(angle + i * (120 * step)); + ctx.beginPath(); + ctx.moveTo(canvas.width / 2, canvas.height / 2); + ctx.lineTo(x, y); + ctx.stroke(); + ctx.closePath(); + + ctx.beginPath(); + ctx.arc(x, y, radius / 2.5, 0, 2 * Math.PI); + ctx.stroke(); + ctx.fill(); + ctx.closePath(); + } + + ctx.beginPath(); + ctx.arc(canvas.width / 2, canvas.height / 2, radius / 2.5, 0, 2 * Math.PI); + ctx.stroke(); + ctx.fill(); + ctx.closePath(); + + window.requestAnimationFrame(render); +} + +render(); \ No newline at end of file diff --git a/Games/Fidget_Spinner_Game/styles.css b/Games/Fidget_Spinner_Game/styles.css new file mode 100644 index 0000000000..09d85eaf10 --- /dev/null +++ b/Games/Fidget_Spinner_Game/styles.css @@ -0,0 +1,14 @@ +body { + margin: 0; + background: #000; + } + + canvas { + display: block; + margin: 0 auto; + } + corner{ + position: absolute; + top: 5px; + right: 10px; + } \ No newline at end of file diff --git a/Games/Gobblet/README.md b/Games/Gobblet/README.md new file mode 100644 index 0000000000..7f05f5dfd7 --- /dev/null +++ b/Games/Gobblet/README.md @@ -0,0 +1,42 @@ +# Gobblet + +## Description 📃 +Gobblet is a strategic board game where players take +turns placing their pieces on a 5x5 grid. Each player has 3 pieces +of each four different sizes (that makes 12 pieces total), and the objective +is to align five pieces of their color in a row either horizontally, +vertically, or diagonally. Pieces can be placed on top of smaller pieces, +and if a larger piece is moved, the smaller piece underneath it becomes +visible again. + +## Functionalities 🎮 +- **Piece Placement**: Players can select a piece and place it on the board. Pieces can only be placed on empty cells or on top of smaller pieces. +- **Piece Movement**: Players can move their pieces already on the board to another cell. +- **Stacking**: Pieces can stack on top of each other. If the top piece is moved, the piece underneath becomes visible again. +- **Win Condition**: The game checks for a winning condition when five pieces of the same player align in a row. +- **Score Keeping**: The game keeps track of the score, awarding points for each win. +- **Restart Game**: Players can restart the game while keeping the current score. +- **Reset Score**: Players can reset the scores to zero. + +## How to play? 🕹️ +1. **Select a Piece**: Click on one of your available pieces to select it. +2. **Place or Move a Piece**: Click on an empty cell or on top of a smaller piece on the board to place the selected piece. You can also move pieces already on the board. +3. **Win the Game**: Align five of your pieces in a row either horizontally, vertically, or diagonally to win the game and score a point. +4. **Restart or Reset**: Use the "Restart Game" button to start a new game or "Reset Score" to reset the scores to zero. + +## Screenshots 📸 +### Initial Screen +![Initial Screen](images/Gobblet.png) + +### The Board +![Piece Selection](images/GobbletBoard.png) + +### Gameplay +![Piece Selection](images/GobbletGamePlay.png) + +### Winning Condition +![Winning Condition](images/GobbletWin.png) + +### Settings +![Settings](images/GobbletSettings.png) + diff --git a/Games/Gobblet/images/Gobblet.png b/Games/Gobblet/images/Gobblet.png new file mode 100644 index 0000000000..889a303e4a Binary files /dev/null and b/Games/Gobblet/images/Gobblet.png differ diff --git a/Games/Gobblet/images/GobbletBoard.png b/Games/Gobblet/images/GobbletBoard.png new file mode 100644 index 0000000000..ec6be23d50 Binary files /dev/null and b/Games/Gobblet/images/GobbletBoard.png differ diff --git a/Games/Gobblet/images/GobbletGamePlay.png b/Games/Gobblet/images/GobbletGamePlay.png new file mode 100644 index 0000000000..d6567048d4 Binary files /dev/null and b/Games/Gobblet/images/GobbletGamePlay.png differ diff --git a/Games/Gobblet/images/GobbletSettings.png b/Games/Gobblet/images/GobbletSettings.png new file mode 100644 index 0000000000..fdd276e375 Binary files /dev/null and b/Games/Gobblet/images/GobbletSettings.png differ diff --git a/Games/Gobblet/images/GobbletWin.png b/Games/Gobblet/images/GobbletWin.png new file mode 100644 index 0000000000..1c3a2ff8e0 Binary files /dev/null and b/Games/Gobblet/images/GobbletWin.png differ diff --git a/Games/Gobblet/index.html b/Games/Gobblet/index.html new file mode 100644 index 0000000000..5539cf3930 --- /dev/null +++ b/Games/Gobblet/index.html @@ -0,0 +1,74 @@ + + + + + + + Gobblet + + + +
+
+

Welcome to Gobblet!

+ +
+
+ +
+

Gobblet

+
+
+
+
+
+
+
+

Player Red Score: 0

+

Player Blue Score: 0

+
+ + + + + + + + + + + +
+ + + + + + diff --git a/Games/Gobblet/mp3/BLACKPINK - Kill This Love Official Instrumental.mp3 b/Games/Gobblet/mp3/BLACKPINK - Kill This Love Official Instrumental.mp3 new file mode 100644 index 0000000000..c2a01baeb6 Binary files /dev/null and b/Games/Gobblet/mp3/BLACKPINK - Kill This Love Official Instrumental.mp3 differ diff --git a/Games/Gobblet/mp3/munch-sound-effect.mp3 b/Games/Gobblet/mp3/munch-sound-effect.mp3 new file mode 100644 index 0000000000..4ee54b40f1 Binary files /dev/null and b/Games/Gobblet/mp3/munch-sound-effect.mp3 differ diff --git a/Games/Gobblet/script.js b/Games/Gobblet/script.js new file mode 100644 index 0000000000..819dd54e64 --- /dev/null +++ b/Games/Gobblet/script.js @@ -0,0 +1,408 @@ +document.addEventListener("DOMContentLoaded", function() { + const startButton = document.getElementById('startButton'); + const startScreen = document.getElementById('startScreen'); + const board = document.getElementById("board"); + const player1Pieces = document.getElementById("player1-pieces"); + const player2Pieces = document.getElementById("player2-pieces"); + const message = document.getElementById("message"); + const winMessage = document.getElementById("winMessage"); + const score1 = document.getElementById("score1"); + const score2 = document.getElementById("score2"); + const restartGameButton = document.getElementById("restartGame"); + const resetScoreButton = document.getElementById("resetScore"); + const playButton = document.getElementById('playButton'); + const pauseButton = document.getElementById('pauseButton'); + const backgroundMusic = document.getElementById('backgroundMusic'); + const stackSound = document.getElementById('stackSound'); + const autoDim = document.getElementById('autoDim'); + const musicVolume = document.getElementById('musicVolume'); + const effectVolume = document.getElementById('effectVolume'); + const settingsIcon = document.getElementById('settingsIcon'); + const closeButton = document.querySelector('.close'); + + //Player that always begins is Red + let currentPlayer = 1; + //Player 1 is Red + let colorPlayer = "Red"; + //At the beginning no pieces are selected + let selectedPiece = null; + let boardState = new Array(25).fill(null).map(() => []); + let autoDimEnabled = true; + //Variable to control the game state + let gameOver = false; + + //Handle failed attempt to automatically play music on document load + backgroundMusic.play().catch(error => { + console.error("Error!, Automatic playing of the backgroundmusic!", error); + }); + + //Start button for the game + startButton.addEventListener('click', function() { + startScreen.style.display = 'none'; + backgroundMusic.play(); + }); + + //Initialize each cell on the board + for (let i = 0; i < 25; i++) { + let cell = document.createElement("div"); + cell.className = "cell"; + cell.dataset.index = i; + board.appendChild(cell); + //Set up click event listeners + cell.addEventListener('click', function() { + //Prevent interaction if the game is over + if (gameOver) return; + + if (selectedPiece && parseInt(selectedPiece.dataset.player) === currentPlayer && canPlacePiece(cell)) { + placePiece(cell, parseInt(cell.dataset.index)); + } else if (!selectedPiece && cell.querySelector('.piece') && parseInt(cell.querySelector('.piece').dataset.player) === currentPlayer) { + selectPiece(cell.querySelector('.piece'), parseInt(cell.dataset.index)); + } else if (!selectedPiece && boardState[i].length > 0 && parseInt(boardState[i][boardState[i].length - 1].dataset.player) === currentPlayer) { + selectPiece(boardState[i][boardState[i].length - 1], i); + } + }); + } + + //Initialize pieces for both player + function initializePieces() { + [player1Pieces, player2Pieces].forEach((container, index) => { + //Clear previous pieces + container.innerHTML = ''; + const player = index + 1; + [4, 3, 2, 1].forEach(size => { + for (let i = 0; i < 3; i++) { + let piece = document.createElement("div"); + piece.className = `piece piece${size}`; + piece.dataset.size = size; + piece.dataset.player = player; + container.appendChild(piece); + //Attach event listener for selecting pieces + piece.addEventListener('click', function() { + if (parseInt(piece.dataset.player) === currentPlayer && !piece.classList.contains('used')) { + selectPiece(piece); + } + }); + } + }); + }); + } + + //Select or deselect a piece when clicked + function selectPiece(piece, index) { + if (selectedPiece === piece) { + piece.classList.remove('selected'); + selectedPiece = null; + message.textContent = `Player ${colorPlayer}: Select a piece to play or move.`; + return; + } + if (selectedPiece) { + selectedPiece.classList.remove('selected'); + } + + selectedPiece = piece; + selectedPiece.classList.add('selected'); + message.textContent = `Player ${colorPlayer}: Click on the board to place or move it.`; + } + + //Determine if a piece can be placed on a specific cell + function canPlacePiece(cell) { + const topPiece = cell.querySelector('.piece'); + return (!topPiece || (parseInt(selectedPiece.dataset.size) > parseInt(topPiece.dataset.size) && parseInt(selectedPiece.dataset.player) !== parseInt(topPiece.dataset.player))) && !selectedPiece.classList.contains('used'); + } + + //Remove a piece from the pool when it has been placed on the board + function removePieceFromPool(selectedPiece) { + selectedPiece.classList.add('used'); + selectedPiece.style.display = 'none'; + } + + //Place a piece on a cell + function placePiece(cell, index) { + if (selectedPiece.parentNode.classList.contains('cell')) { + removePieceFromCell(selectedPiece.parentNode); + } + + const newPiece = createNewPiece(index); + addPieceToCell(newPiece, cell, index); + removePieceFromPool(selectedPiece); + + selectedPiece = null; + document.querySelectorAll('.selected').forEach(p => p.classList.remove('selected')); + + //check if placing the piece leads to a win + if (checkWin(currentPlayer)) { + gameOver = true; + message.textContent = `Player ${colorPlayer} wins!`; + document.getElementById('winMessage').textContent = `Player ${colorPlayer} wins!`; + showModal(); + updateScore(); + // setTimeout(() => alert(`Player ${colorPlayer} wins!`), 100); + } else { + switchPlayer(); + } + } + + function showModal() { + const modal = document.getElementById('winModal'); + modal.style.display = 'block'; + const closeBtn = modal.querySelector('.close'); + closeBtn.onclick = function() { + modal.style.display = 'none'; + }; + } + + //Remove a piece from a cell when another piece is placed on top of it + function removePieceFromCell(cell) { + const originalIndex = parseInt(selectedPiece.parentNode.dataset.index); + const stack = boardState[originalIndex]; + const removedPiece = stack.pop(); + if (stack.length > 0) { + const underlyingPiece = stack[stack.length - 1]; + const cellUnderlying = document.querySelector(`[data-index="${originalIndex}"]`); + //Clear the cell + cellUnderlying.innerHTML = ''; + //Add the bottom piece back to the cell + cellUnderlying.appendChild(underlyingPiece.cloneNode(true)); + } else { + //Clear the cell + cell.innerHTML = ''; + //Update the board state to indicate the cell is empty + boardState[originalIndex] = []; + } + + checkWinAfterMove(); + } + + function checkWinAfterMove() { + if (checkWin(1)) { + gameOver = true; + winMessage.textContent = `Player Red wins!`; + showModal(); + updateScoreStcks(); + } else if (checkWin(2)) { + gameOver = true; + winMessage.textContent = `Player Blue wins!`; + showModal(); + updateScoreStcks(); + } + } + + function updateScoreStcks() { + if (currentPlayer === 1) { + score2.textContent = parseInt(score2.textContent) + 1; + } else { + score1.textContent = parseInt(score1.textContent) + 1; + } + } + + //Create a new piece based on the selected piece's properties + function createNewPiece(index) { + const newPiece = selectedPiece.cloneNode(true); + newPiece.dataset.index = index; + return newPiece; + } + + //Add a piece to a cell + update the board state + function addPieceToCell(piece, cell, index) { + const topPiece = cell.querySelector('.piece'); + if (topPiece) { + const stack = boardState[index]; + stack.push(piece); + cell.appendChild(piece); + + //Play a sound when a piece is placed on top of another piece + playStackSound(); + } else { + //Clear the cell + cell.innerHTML = ''; + cell.appendChild(piece); + //Update the board state to include the new piece + boardState[index] = [piece]; + } + } + + //Check if the current player has won the game + function checkWin(player) { + const lines = [ + [0, 1, 2, 3, 4], [5, 6, 7, 8, 9], [10, 11, 12, 13, 14], + [15, 16, 17, 18, 19], [20, 21, 22, 23, 24], + [0, 5, 10, 15, 20], [1, 6, 11, 16, 21], [2, 7, 12, 17, 22], + [3, 8, 13, 18, 23], [4, 9, 14, 19, 24], + [0, 6, 12, 18, 24], [4, 8, 12, 16, 20] + ]; + + return lines.some(line => { + let consecutiveCount = 0; + for (let i = 0; i < line.length; i++) { + const index = line[i]; + const cell = document.querySelector(`.cell[data-index="${index}"]`); + const topPiece = cell.querySelector('.piece:last-child'); + if (topPiece && parseInt(topPiece.dataset.player) === player) { + consecutiveCount++; + if (consecutiveCount === 5) { + //Player wins if they have five consecutive pieces + return true; + } + } else { + consecutiveCount = 0; + } + } + //Return false if no winning line is found + return false; + }); + } + + //Update the score for the current player + function updateScore() { + if (currentPlayer === 1) { + score1.textContent = parseInt(score1.textContent) + 1; + } else { + score2.textContent = parseInt(score2.textContent) + 1; + } + } + + //Switch the current player + function switchPlayer() { + currentPlayer = currentPlayer === 1 ? 2 : 1; + if (currentPlayer == 1) { + colorPlayer = "Red"; + } else { + colorPlayer = "Blue"; + } + //Deselect any selected piece + selectedPiece = null; + document.querySelectorAll('.selected').forEach(p => p.classList.remove('selected')); + message.textContent = `Player ${colorPlayer}: Select a piece to play or move.`; + } + + //Reset the game to its initial state + function resetGame() { + boardState.fill(null).map(() => ({ size: 0, player: null })); + document.querySelectorAll('.cell').forEach(cell => cell.innerHTML = ''); + document.querySelectorAll('.piece').forEach(piece => { + //Restore visibility for new game + piece.style.display = ''; + piece.classList.remove('used'); + piece.classList.remove('selected'); + }); + + gameOver = false; + //Hide the modal on game reset + document.getElementById('winModal').style.display = 'none'; + //Reinitialize pieces + initializePieces(); + currentPlayer = 1; + message.textContent = `Player Red begins.`; + } + + //Reset the score for both players to zero + function resetScore() { + score1.textContent = '0'; + score2.textContent = '0'; + } + + settingsIcon.addEventListener('click', function() { + document.getElementById('settingsModal').style.display = 'block'; + }); + + closeButton.addEventListener('click', function() { + document.getElementById('settingsModal').style.display = 'none'; + }); + + window.onclick = function(event) { + const modal = document.getElementById('settingsModal'); + if (event.target == modal) { + modal.style.display = 'none'; + } + }; + + const backgroundMusicController = (function() { + const musicElement = document.getElementById('backgroundMusic'); + + function play() { + musicElement.play(); + } + + function pause() { + musicElement.pause(); + } + + function setVolume(volumeLevel) { + musicElement.volume = volumeLevel; + } + + return { + play: play, + pause: pause, + setVolume: setVolume + }; + })(); + + function updateMusicVolume(volume) { + backgroundMusic.volume = volume; + } + + function updateEffectVolume(volume) { + stackSound.volume = volume; + } + + function toggleAutoDim(enabled) { + autoDimEnabled = enabled; + } + + function adjustMusicVolumeForStackSound() { + if (!autoDimEnabled) return; + + const originalVolume = backgroundMusic.volume; + //Dim the music to 50% of the original volume when the stack sound plays + backgroundMusic.volume *= 0.5; + stackSound.play(); + + stackSound.onended = function() { + //Restore the original music volume when the stack sound ends + backgroundMusic.volume = originalVolume; + }; + } + + function playStackSound() { + if (autoDimEnabled) { + adjustMusicVolumeForStackSound(); + stackSound.play(); + } else { + //Play the stack sound when a piece is placed on top of another + stackSound.play(); + } + } + + //Set the initial message when the document is loaded + message.textContent = `Player Red begins.`; + //Attach event listener to the restart game button + restartGameButton.addEventListener('click', resetGame); + //Attach event listener to the reset score button + resetScoreButton.addEventListener('click', resetScore); + playButton.addEventListener('click', function() { + //Play the background music when the play button is clicked + backgroundMusicController.play(); + }); + pauseButton.addEventListener('click', function() { + //Pause the background music when the pause button is clicked + backgroundMusicController.pause(); + }); + autoDim.addEventListener('change', function() { + //Toggle the auto dim feature based on the checkbox state + toggleAutoDim(this.checked); + }); + + musicVolume.addEventListener('input', function() { + //Update the music volume as the music volume slider changes + updateMusicVolume(this.value); + }); + + effectVolume.addEventListener('input', function() { + //Update the effect volume as the effect volume slider changes + updateEffectVolume(this.value); + }); + + //Initialize the pieces for both players when the document is loaded + initializePieces(); +}); diff --git a/Games/Gobblet/style.css b/Games/Gobblet/style.css new file mode 100644 index 0000000000..78dada0253 --- /dev/null +++ b/Games/Gobblet/style.css @@ -0,0 +1,242 @@ +body { + display: flex; + justify-content: center; + align-items: center; + height: 100vh; + background-color: rgb(26, 26, 26); + font-family: Arial, sans-serif; +} + +.start-screen { + position: fixed; + top: 0; + left: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.8); + display: flex; + justify-content: center; + align-items: center; + z-index: 1000; +} + +.start-content { + text-align: center; + color: white; + padding: 20px; + border-radius: 10px; + background: #333; +} + +#startButton { + padding: 10px 20px; + font-size: 20px; + color: #fff; + background-color: #007BFF; + border: none; + border-radius: 5px; + cursor: pointer; + transition: background-color 0.3s; +} + +#startButton:hover { + background-color: #0056b3; +} + +.container { + text-align: center; + background-color: white; + padding: 40px; + border-radius: 20px; +} + +h1 { + color: #FF6347; + text-align: center; + font-size: 3em; + text-transform: uppercase; + text-shadow: 4px 4px 0px rgba(0, 0, 0, 0.1); + margin: 20px; + +} + +.game-area { + display: flex; + justify-content: center; + align-items: center; +} + +.pieces { + display: flex; + flex-direction: column; + gap: 5px; + margin-left: 20px; +} + +#board { + display: grid; + grid-template-columns: repeat(5, 80px); + grid-template-rows: repeat(5, 80px); + gap: 5px; + margin: 20px; +} + +.cell { + width: 80px; + height: 80px; + background-color: rgb(221, 177, 255); + border-radius: 50%; + border: 2px solid rgb(179, 80, 255); + display: flex; + justify-content: center; + align-items: center; + position: relative; + margin: 10px; + overflow: hidden; +} + +.cell::before { + content: ''; + position: absolute; + top: 10px; + left: 10px; + right: 10px; + bottom: 10px; + border-radius: 50%; +} + +.cell .piece { + position: absolute; + display: flex; + justify-content: center; + align-items: center; +} + +.piece1 { + width: 20px; + height: 20px; + background-color: #ffc8c8; + border-radius: 50%; + border: 3px solid #5ccd00; +} + +.piece2 { + width: 30px; + height: 30px; + background-color: #fd8282; + border-radius: 50%; + border: 3px solid #5ccd00; +} + +.piece3 { + width: 40px; + height: 40px; + background-color: #c43232; + border-radius: 50%; + border: 3px solid #5ccd00; +} + +.piece4 { + width: 50px; + height: 50px; + background-color: #8d0000; + border-radius: 50%; + border: 3px solid #5ccd00; +} + +.piece[data-player="2"].piece1 { + background-color: #ADD8E6; +} + +.piece[data-player="2"].piece2 { + background-color: #87CEEB; +} + +.piece[data-player="2"].piece3 { + background-color: #4682B4; +} + +.piece[data-player="2"].piece4 { + background-color: #0000CD; +} + + +.piece.selected { + border: 3px solid gold; +} + +#message { + margin: 20px 0; + font-size: 1.5em; +} + +#restartGame, +#resetScore, +#playButton, +#pauseButton { + padding: 10px 20px; + font-size: 1em; + cursor: pointer; + margin: 10px; + border-radius: 10px; +} + +#restartGame:hover, +#resetScore:hover, +#playButton:hover, +#pauseButton:hover { + background-color: #dbdbdb; + border: 2px solid gold; +} + +.iconHover:hover { + color: #ff0000; +} + +#scoreboard { + margin: 20px 0; + font-size: 1.2em; +} + +.modal { + display: none; + position: fixed; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: rgba(39, 39, 39, 0.4); +} + +.modal-content { + background-color: #fefefe; + margin: 15% auto; + padding: 20px; + border: 3px solid red; + border-radius: 20px; + width: 50%; +} + +.close { + color: #aaa; + float: right; + font-size: 28px; + font-weight: bold; +} + +.close:hover, +.close:focus { + color: red; + text-decoration: none; + cursor: pointer; +} + +/* Keyframes voor de wiggle animatie */ +@keyframes wiggle { + 0%, 100% { + transform: rotate(-1deg) scaleX(-1); + } + 50% { + transform: rotate(1deg) scaleX(-1); + } +} diff --git a/Games/Sliding_puzzle/Readme.md b/Games/Sliding_puzzle/Readme.md new file mode 100644 index 0000000000..3f091d2665 --- /dev/null +++ b/Games/Sliding_puzzle/Readme.md @@ -0,0 +1,23 @@ +## Sliding Puzzle + +Sliding Puzzle is a single-player puzzle game. The goal of the game is to rearrange the numbered tiles in order from 1 to 15, with the empty space being the last tile. You can move the tiles by swiping in the direction of the empty space. + +The game keeps track of your score and time. The score is incremented every time you move a tile. The timer starts when you begin a new game and stops when you solve the puzzle. + +### How to Play + +1. Tap "New Game" to start a new game. +2. Click a tile to make it move in the direction of the empty space. +3. Continue swiping tiles until the puzzle is solved (numbers are in order from 1 to 15). + +### Tips + +* Plan your moves ahead of time. +* Try to work on getting the corner pieces in place first. +* There are many different ways to solve the puzzle. Experiment and find what works best for you. + +I hope you enjoy playing Sliding Puzzle! + +Here's an image of the game window. + +![Screenshot 2024-06-21 005055](https://github.com/kunjgit/GameZone/assets/141642724/fc66d8b7-1f5a-4a1e-a0d9-d6ea0d5d7fcf) \ No newline at end of file diff --git a/Games/Sliding_puzzle/index.html b/Games/Sliding_puzzle/index.html new file mode 100644 index 0000000000..2e139fceda --- /dev/null +++ b/Games/Sliding_puzzle/index.html @@ -0,0 +1,52 @@ + + + + + + + Document + + + + + +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+

Sliding Puzzle

+
+
+
Score
+
0
+
Time
+
0
+
+
+ +
+
+ + + + diff --git a/Games/Sliding_puzzle/main.js b/Games/Sliding_puzzle/main.js new file mode 100644 index 0000000000..bda2c7920e --- /dev/null +++ b/Games/Sliding_puzzle/main.js @@ -0,0 +1,178 @@ +let board =[]; +let moves =0; +let seconds=0; +let tileContainer = document.querySelector(".tileContainer"); +let moveElement = document.getElementById("moveElement"); +let timerElement = document.getElementById("timer"); +let intervalId; +const alert = document.getElementById("alert"); + +createBoard(); +fillBoard(); + +function createBoard() { + for(let i=0;i<4;i++) { + let row=[]; + for(let j=0;j<4;j++) { + row.push(0); + } + board.push(row); + } +} + +function fillBoard() { + let numbers = Array.from({length:15},(_,i)=>i+1); + numbers.push(null); + let emptyIndex = numbers.length-1; + for (let i=0;i<1000;i++) { + let swapIndex = getRandomValidMove(emptyIndex); + [numbers[emptyIndex],numbers[swapIndex]] = [numbers[swapIndex],numbers[emptyIndex]] ; + emptyIndex = swapIndex; + } + let index = 0; + for (let y=3;y>=0;y--) { + for (let x=0;x<4;x++) { + if(index0) validMoves.push(emptyIndex-1); + if(x<3) validMoves.push(emptyIndex+1); + if(y>0) validMoves.push(emptyIndex-4); + if(y<3) validMoves.push(emptyIndex+4); + + return validMoves[Math.floor(Math.random()*validMoves.length)]; +} + +function addTileAt(x,y,value) { + board[x][y] = value; + addTileToPage(x,y,board[x][y]); +} + +function addTileToPage(row,column,value) { + let tile = document.createElement("div"); + tile.classList.add( + "tile", + "row"+(row+1), + "column"+(column+1), + "value"+value + ); + tile.innerHTML = value; + tileContainer.appendChild(tile); +} + +function startNewGame() { + alert.style.display = "none"; + tileContainer.innerHTML = ""; + moveElement.innerHTML =0; + timerElement.innerHTML = 0; + board = []; + moves = 0; + seconds = 0; + createBoard(); + fillBoard(); + window.onload = addClickEventToTiles(); + stopTimer(); +} + +function startTimer() { + intervalId = setInterval(function(){ + seconds++; + timerElement.innerHTML = seconds; + },1000); +} + +function stopTimer() { + clearInterval(intervalId); +} + +window.onload = addClickEventToTiles(); + +function addClickEventToTiles() { + let tiles = document.querySelectorAll(".tile"); + tiles.forEach(function(tile){ + tile.addEventListener("click",onTileClick); + }); +} + +function onTileClick(event) { + if(moves ==0) + startTimer(); + let [row,column] = getRowAndColumn(event.target); + moveTiles(row-1,column-1); + let gameOver = isGameOver(); + if(gameOver){ + showAlert(); + stopTimer(); + } +} + +function getRowAndColumn(element) { + let classes = element.classList; + let row,column; + for (let i=0;i=0 && newX<4 && newY>=0 && newY<4 && board[newX][newY]=== 0) { + board[newX][newY] = board[x][y]; + board[x][y] = 0; + let tileClass = ".row"+(x+1)+".column"+(y+1); + let tile = document.querySelector(tileClass); + moveTileOnPage(newX,newY,tile); + moves++; + moveElement.innerHTML = moves; + break; + } + } +} + +function moveTileOnPage(row,column,tile) { + let classes = Array.from(tile.classList); + classes.forEach((className)=>{ + if(className.startsWith("row") || className.startsWith("column")) { + tile.classList.remove(className); + } + }); + tile.classList.add("row"+(row+1),"column"+(column+1)); +} + +function isGameOver() { + for(let i=0;i<15;i++) { + if(board[3-Math.floor(i/4)][i%4]!== i+1) { + return false; + } + } + return board[0][3]===0; +} + +function showAlert() { + alert.innerHTML = '
You won!
'; + alert.style.display = "flex"; + alert.style.flexDirection = "column"; + stopTimer(); +} \ No newline at end of file diff --git a/Games/Sliding_puzzle/style.css b/Games/Sliding_puzzle/style.css new file mode 100644 index 0000000000..d7a3b74541 --- /dev/null +++ b/Games/Sliding_puzzle/style.css @@ -0,0 +1,166 @@ +body{ + display: flex; + background: whitesmoke; + align-items: center; + justify-content: center; + font-family: Arial, Helvetica, sans-serif; + } + .container { + position: relative; + display: flex; + flex-direction: row; + } + .board { + display: flex; + width: 40vw; + height: 40vw; + flex-wrap: wrap; + align-items: center; + justify-content: center; + border-radius: 5px; + padding-top: 10px; + padding-bottom: 10px; + background-color: #313231; + } + .square { + display: flex; + width: 22%; + height: 22%; + margin: 1%; + border-radius: 3px; + background: #dce4e7; + justify-content: center; + align-items: center; + position: relative; + } + .elementContainer { + margin-bottom: 70px; + } + .title{ + display: flex; + align-items: center; + justify-content: center; + margin-left: 10px; + } + h1 { + font-size: 20px; + color:black; + } + .moveElementContainer { + display: flex; + flex-direction: column; + background: #313231; + padding:15px 25px; + font-size: 25px; + font-weight: bold; + border-radius: 3px; + color: white; + text-align: center; + margin-left: 10px; + } + + #moveLabel,#timerLabel { + color:whitesmoke; + font-size: 20px; + } + button { + width:180px; + height: 50px; + outline: none; + font-size: large; + font-weight: bold; + background-color: #313231; + color:#f9f6f2; + border: none; + border-radius: 3px; + margin-left: 10px; + margin-top: 10px; + cursor: pointer; + } + + .tile { + width: 22%; + height: 22%; + display: flex; + z-index: 1; + align-items: center; + justify-content: center; + font-size: 50px; + font-weight: bold; + position: absolute; + color:whitesmoke; + background-color: #3db1a6; + transition: top 0.25s, left 0.25s; + } + + .row1{ + top:75%; + } + .row2{ + top:51%; + } + .row3{ + top:27%; + } + .row4{ + top:3%; + } + + .column1{ + left:3%; + } + .column2{ + left:27%; + } + .column3{ + left:51%; + } + .column4{ + left:75%; + } + + #alert { + color:#19b188; + background: rgba(238, 228, 218, 0.73); + font-size: 60px; + font-weight: bold; + width: 100%; + height: 100%; + justify-content: center; + align-items: center; + display: none; + position: absolute; + z-index: 3; + } + + @media(max-width:600px) { + body{ + flex-wrap: wrap; + } + .elementContainer { + margin: 0; + } + .tile{ + font-size: 20px; + } + h1 { + font-size:14px; + } + button { + width: 100px; + height: 30px; + font-size: small; + } + .moveElementContainer,#moveLabel,#timerLabel{ + font-size: 14px; + } + #moveLabel { + font-size: 14px; + } + .board{ + padding-top: 5px; + padding-bottom: 5px; + width: 60vw; + height: 60vw; + } + } \ No newline at end of file diff --git a/Games/Spell_Bee/README.md b/Games/Spell_Bee/README.md new file mode 100644 index 0000000000..d1c9742626 --- /dev/null +++ b/Games/Spell_Bee/README.md @@ -0,0 +1,19 @@ +# Spell Bee + +The game is based on real life spelling bee competition. Listen to word and Enter correct spelling of that word. + +# How to Play + +To begin playing, click on "Begin" button and game will start. Player can listen to the pronunciation of word and can type in the answer bar. +Player can also listen to the word used in a sentence or can see its meaning for proper guessin but it will charge him some score points. + + +# Scores + +Score points are awareded and deducted based on: + 1. Correct Answer +5 points + 2. Speak Sentence -2 points + 3. Show Meaning -1 point. + +# Contributed by : +https://github.com/Markcosay \ No newline at end of file diff --git a/Games/Spell_Bee/Spell Bee.png b/Games/Spell_Bee/Spell Bee.png new file mode 100644 index 0000000000..dd31cfccd1 Binary files /dev/null and b/Games/Spell_Bee/Spell Bee.png differ diff --git a/Games/Spell_Bee/assets/spell_bee_screenshot.png b/Games/Spell_Bee/assets/spell_bee_screenshot.png new file mode 100644 index 0000000000..87720cc939 Binary files /dev/null and b/Games/Spell_Bee/assets/spell_bee_screenshot.png differ diff --git a/Games/Spell_Bee/index.html b/Games/Spell_Bee/index.html new file mode 100644 index 0000000000..1c37881608 --- /dev/null +++ b/Games/Spell_Bee/index.html @@ -0,0 +1,396 @@ + + + + + + + Spell Bee + + + + +
+ +
+
+ + + +
+ + + + +
+
Level: 1
+
Score: 0
+
+
+ + + + diff --git a/Games/keySymphony/index1.html b/Games/keySymphony/index1.html new file mode 100644 index 0000000000..8805824656 --- /dev/null +++ b/Games/keySymphony/index1.html @@ -0,0 +1,46 @@ + + + + + + KeySymphony + + + + +
+
+

+ KeySymphony +

+
+ Sound +
+ +
+ Show Keys +
+
+
    +
  • a
  • +
  • w
  • +
  • s
  • +
  • e
  • +
  • d
  • +
  • f
  • +
  • t
  • +
  • g
  • +
  • y
  • +
  • h
  • +
  • u
  • +
  • j
  • +
  • k
  • +
  • o
  • +
  • l
  • +
  • p
  • +
  • ;
  • + +
+
+ + \ No newline at end of file diff --git a/Games/keySymphony/index1.js b/Games/keySymphony/index1.js new file mode 100644 index 0000000000..2247b0cc99 --- /dev/null +++ b/Games/keySymphony/index1.js @@ -0,0 +1,43 @@ +document.addEventListener("DOMContentLoaded", () => { + const pianoKeys = document.querySelectorAll(".Piano .key"), + volumeSlider = document.querySelector(".sound input"), + keyCheckbox = document.querySelector(".keys-checkbox input"); + + let allKeys = [], + audio = new Audio(); + + const playTune = (key) => { + audio.src = `tunes/${key}.wav`; + audio.play(); + + const clickedKey = document.querySelector(`[data-key="${key}"]`); + if (clickedKey) { + clickedKey.classList.add("active"); + setTimeout(() => { + clickedKey.classList.remove("active"); + }, 160); + } + }; + + const handleVolume = (e) => { + audio.volume = e.target.value / 100; + }; + + const showHideKeys = () => { + pianoKeys.forEach(key => key.classList.toggle("hide")); + }; + + pianoKeys.forEach(key => { + allKeys.push(key.dataset.key); + // Calling playTune function with passing data-key value as an argument + key.addEventListener("click", () => playTune(key.dataset.key)); + }); + + const pressedKey = (e) => { + if (allKeys.includes(e.key)) playTune(e.key); + }; + + keyCheckbox.addEventListener("click", showHideKeys); + volumeSlider.addEventListener("input", handleVolume); + document.addEventListener("keydown", pressedKey); +}); diff --git a/Games/keySymphony/style1.css b/Games/keySymphony/style1.css new file mode 100644 index 0000000000..158e467767 --- /dev/null +++ b/Games/keySymphony/style1.css @@ -0,0 +1,186 @@ + +@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap'); + +*{ + margin: 0; + padding: 0; + box-sizing: border-box; + font-family:'Poppins',sans-serif; +} +body{ +display: flex; + align-items: center; + justify-content: center; + min-height: 100vh; + background-color: rgb(207, 232, 255); +} +.wrapper{ + border-radius: 20px; + width:795px; + background-color: black; + padding: 32px 40px; + +} +.wrapper header{ + color: rgb(255, 255, 222); + display: flex; + align-items: center; + justify-content: center; + justify-content: space-between; +} +header h2{ + font-size:35px; +} +header .column{ + display: flex; + justify-content: center; + align-items: center; +} +header .column span{ + font-weight: 420; + font-size: 18px; + margin-right:15px; +} +.sound input{ + accent-color: #c3c018; +} +.keys-checkbox input{ + height:35px ; + width:65px; + cursor:pointer; + border-radius:30px ; + background: #118df3; + appearance: none; + outline:none; + position: relative; +} +.keys-checkbox input::before{ + content: ""; + border-radius: inherit; + position: absolute; + background-color: rgb(137, 239, 217); + width: 25px; + height: 25px; + top:50%; + left: 5px; + transform: translateY(-50%); + transition: all 0.2s ease; +} +.keys-checkbox input:checked::before{ + left:35px; + background-color: antiquewhite; +} +.Piano{ + display: flex; + margin-top: 40px; + /* padding: 20px 10px; */ + justify-content: center; + list-style: none; +} +.Piano .key{ + list-style:none; + /* color: rgb(143, 130, 112); */ + text-transform: uppercase; + cursor: pointer; + user-select: none; + position: relative; +} +.Piano .white{ + width:80px; + height:230px; + border: 1px solid black; + background: linear-gradient(#fff 96%,#eee 4%); + border-radius: 9px; + +} +.Piano .white:active{ + box-shadow:inset -5px 5px 20px rgba(0,0,0,0.2); + background-color: linear-gradient(to bottom, #fff 0%, #eee 100%); +} +.Piano .black{ + width:44px; + height:140px; + /* border: 1px solid black; */ + background: linear-gradient(#333 ,#000 ); + border-radius: 0 0 5px 5px; + z-index: 2; + margin: 0 -22px 0 -22px; +} +.Piano .black:active{ + box-shadow:inset -5px -10px 10px rgba(255,255,255,0.2); + background-color: linear-gradient(to bottom, #000 , #434343); +} +.Piano span{ + position: absolute; + bottom: 20px; + width: 100%; + font-size: 1.15rem; + text-align: center; +} +.Piano .key span { + position: absolute; + bottom: 20px; + width: 100%; + color: #A2A2A2; + font-size: 1.13rem; + text-align: center; + } + .Piano .key.hide span { + display: none; + } + .Piano .black span { + bottom: 13px; + color: #888888; + } +.Piano .key{ + list-style: none; + color: rgba(174, 174, 174, 0.856); +} +.Piano .key.hide span { + display: none; + } + .Piano .black span { + bottom: 13px; + color: #888888; + } + @media screen and (max-width: 815px) { + .wrapper { + padding: 25px; + } + header { + flex-direction: column; + } + header :where(h2, .column) { + margin-bottom: 13px; + } + .sound input { + max-width: 100px; + } + .Piano { + margin-top: 20px; + } + .Piano .key:where(:nth-child(9), :nth-child(10)) { + display: none; + } + .Piano .black { + height: 100px; + width: 40px; + margin: 0 -20px 0 -20px; + } + .Piano .white { + height: 180px; + width: 60px; + } + } + @media screen and (max-width: 615px) { + .Piano .key:nth-child(13), + .Piano .key:nth-child(14), + .Piano .key:nth-child(15), + .Piano .key:nth-child(16), + .Piano .key :nth-child(17) { + display: none; + } + .Piano .white { + width: 50px; + } + } \ No newline at end of file diff --git a/Games/keySymphony/tunes/;.wav b/Games/keySymphony/tunes/;.wav new file mode 100644 index 0000000000..a71fe4e48e Binary files /dev/null and b/Games/keySymphony/tunes/;.wav differ diff --git a/Games/keySymphony/tunes/a.wav b/Games/keySymphony/tunes/a.wav new file mode 100644 index 0000000000..fa6e07a38d Binary files /dev/null and b/Games/keySymphony/tunes/a.wav differ diff --git a/Games/keySymphony/tunes/d.wav b/Games/keySymphony/tunes/d.wav new file mode 100644 index 0000000000..7377899844 Binary files /dev/null and b/Games/keySymphony/tunes/d.wav differ diff --git a/Games/keySymphony/tunes/e.wav b/Games/keySymphony/tunes/e.wav new file mode 100644 index 0000000000..1325049800 Binary files /dev/null and b/Games/keySymphony/tunes/e.wav differ diff --git a/Games/keySymphony/tunes/f.wav b/Games/keySymphony/tunes/f.wav new file mode 100644 index 0000000000..31aa67be88 Binary files /dev/null and b/Games/keySymphony/tunes/f.wav differ diff --git a/Games/keySymphony/tunes/g.wav b/Games/keySymphony/tunes/g.wav new file mode 100644 index 0000000000..bd0e58c44b Binary files /dev/null and b/Games/keySymphony/tunes/g.wav differ diff --git a/Games/keySymphony/tunes/h.wav b/Games/keySymphony/tunes/h.wav new file mode 100644 index 0000000000..921b7d5e3f Binary files /dev/null and b/Games/keySymphony/tunes/h.wav differ diff --git a/Games/keySymphony/tunes/j.wav b/Games/keySymphony/tunes/j.wav new file mode 100644 index 0000000000..747367fe86 Binary files /dev/null and b/Games/keySymphony/tunes/j.wav differ diff --git a/Games/keySymphony/tunes/k.wav b/Games/keySymphony/tunes/k.wav new file mode 100644 index 0000000000..52598b1a6a Binary files /dev/null and b/Games/keySymphony/tunes/k.wav differ diff --git a/Games/keySymphony/tunes/l.wav b/Games/keySymphony/tunes/l.wav new file mode 100644 index 0000000000..95baa0b64e Binary files /dev/null and b/Games/keySymphony/tunes/l.wav differ diff --git a/Games/keySymphony/tunes/o.wav b/Games/keySymphony/tunes/o.wav new file mode 100644 index 0000000000..853e92da4b Binary files /dev/null and b/Games/keySymphony/tunes/o.wav differ diff --git a/Games/keySymphony/tunes/p.wav b/Games/keySymphony/tunes/p.wav new file mode 100644 index 0000000000..d97f784fb3 Binary files /dev/null and b/Games/keySymphony/tunes/p.wav differ diff --git a/Games/keySymphony/tunes/s.wav b/Games/keySymphony/tunes/s.wav new file mode 100644 index 0000000000..4d53816b8c Binary files /dev/null and b/Games/keySymphony/tunes/s.wav differ diff --git a/Games/keySymphony/tunes/t.wav b/Games/keySymphony/tunes/t.wav new file mode 100644 index 0000000000..1e50ef5c81 Binary files /dev/null and b/Games/keySymphony/tunes/t.wav differ diff --git a/Games/keySymphony/tunes/u.wav b/Games/keySymphony/tunes/u.wav new file mode 100644 index 0000000000..505f00e54a Binary files /dev/null and b/Games/keySymphony/tunes/u.wav differ diff --git a/Games/keySymphony/tunes/w.wav b/Games/keySymphony/tunes/w.wav new file mode 100644 index 0000000000..2a160b5594 Binary files /dev/null and b/Games/keySymphony/tunes/w.wav differ diff --git a/Games/keySymphony/tunes/y.wav b/Games/keySymphony/tunes/y.wav new file mode 100644 index 0000000000..e4caa7049b Binary files /dev/null and b/Games/keySymphony/tunes/y.wav differ diff --git a/README.md b/README.md index 32d731dcd1..0008290f12 100644 --- a/README.md +++ b/README.md @@ -108,10 +108,11 @@ This repository also provides one such platforms where contributers come over an | Game | Game | Game | Game | Game | -| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | + | [Master Typing](https://github.com/kunjgit/GameZone/tree/main/Games/Master_Typing) | [Treasure Hunt](https://github.com/Antiquely3059/GameZone/tree/main/Games/Treasure%20Hunt) | [Virtual Pet](https://github.com/Antiquely3059/GameZone/tree/main/Games/Virtual_Pet) | [MazeRunner](https://github.com/kunjgit/GameZone/tree/main/Games/MazeRunner) | [Ping_Pong_Singleplayer](https://github.com/kunjgit/GameZone/tree/main/Games/Ping_Pong_Singleplayer) | | + | [Tilting Maze](https://github.com/kunjgit/GameZone/tree/main/Games/Tilting_Maze) | [Simon Game Challenge](https://github.com/kunjgit/GameZone/tree/main/Games/Simon_Game_Challenge) | [Snake Game](https://github.com/kunjgit/GameZone/tree/main/Games/Snake_Game) | [Dino Runner Game](https://github.com/kunjgit/GameZone/tree/main/Games/Dino_Runner_Game) | -| [Whack a Mole](https://github.com/kunjgit/GameZone/tree/main/Games/Whack_a_Mole) | [Doraemon Jump](https://github.com/kunjgit/GameZone/tree/main/Games/Doraemon_Jump) | [Black Jack](https://github.com/kunjgit/GameZone/tree/main/Games/Black_Jack) | [Memory Game](https://github.com/kunjgit/GameZone/tree/main/Games/Memory_Game) | [Word Guessing Game](https://github.com/kunjgit/GameZone/tree/main/Games/Word_Guessing_Game) | +| [Whack a Mole](https://github.com/kunjgit/GameZone/tree/main/Games/Whack_a_Mole) | [Doraemon Jump](https://github.com/kunjgit/GameZone/tree/main/Games/Doraemon_Jump) | [Black Jack](https://github.com/kunjgit/GameZone/tree/main/Games/Black_Jack) | [Memory Game](https://github.com/kunjgit/GameZone/tree/main/Games/Memory_Game) | [Word Guessing Game](https://github.com/kunjgit/GameZone/tree/main/Games/Word_Guessing_Game) | [Ludo Game](https://github.com/kunjgit/GameZone/tree/main/Games/Ludo_Game) | [Piano Game](https://github.com/kunjgit/GameZone/tree/main/Games/Piano) | [Atari Breakout](https://github.com/kunjgit/GameZone/tree/main/Games/Atari_Breakout) | [Dinosaur Game](https://github.com/kunjgit/GameZone/tree/main/Games/Chrome_Dinosaur_Game) | [Guess The Colour by RGB Game](https://github.com/kunjgit/GameZone/tree/main/Games/Colour_Guessing_Game) | | [Guess The Number](https://github.com/kunjgit/GameZone/tree/main/Games/Guess_The_Number) | [Race car game](https://github.com/kunjgit/GameZone/tree/main/Games/race_car) | [Aim Training](https://github.com/DP-NOTHING/GameZone/tree/contri/Games/Aim_Training) | [Alien Shooter](https://github.com/kunjgit/GameZone/tree/main/Games/Alien_Shooters) | [Fruit Ninja](https://github.com/kunjgit/GameZone/tree/main/Games/Fruit_Ninja) | | [Doodle Jump](https://github.com/kunjgit/GameZone/tree/main/Games/Doodle_Jump) | [Alphabet Game](https://github.com/kunjgit/GameZone/tree/main/Games/Alphabet) | [Candy Crush](https://github.com/kunjgit/GameZone/tree/main/Games/Candy_Crush) | [Word Association Game](https://github.com/kunjgit/GameZone/tree/main/Games/Word_Association_Game) | [Tic Tac Toe](https://github.com/kunjgit/GameZone/tree/main/Games/Tic_Tac_Toe) | @@ -190,7 +191,7 @@ This repository also provides one such platforms where contributers come over an | [CSS Select](https://github.com/kunjgit/GameZone/tree/main/Games/CSS_Select) | [Squid](https://github.com/kunjgit/GameZone/tree/main/Games/Squid_Game) | [Flip Coin](https://github.com/kunjgit/GameZone/tree/main/Games/Flip_Coin) | [Witty Word Quest](https://github.com/kunjgit/GameZone/tree/main/Games/witty_word_quest) | [Typing Game](https://github.com/Ishan-77/GameZone/tree/main/Games/Typing_Game) | | [numeral-whiz](https://github.com/Ishan-77/GameZone/tree/main/Games/numeral-whiz) | [candy_match](https://github.com/kunjgit/GameZone/tree/main/Games/Candy_Match_Saga) | [Crossy_Road](https://github.com/tanujbordikar/GameZone/tree/Crossy_Road) | [HueHero](https://github.com/kunjgit/GameZone/tree/main/Games/HueHero) | [Puzzel_Winner](https://github.com/kunjgit/GameZone/tree/main/Games/Puzzel_Winner) | | [Emoji_Intruder](https://github.com/kunjgit/GameZone/tree/main/Games/Emoji_Intruder) | [Guess The Weapon](https://github.com/kunjgit/GameZone/tree/main/Games/Guess_The_Weapon) | [Guess Who](https://github.com/kunjgit/GameZone/tree/main/Games/Guess_Who) | [Pop My Balloon](https://github.com/kunjgit/GameZone/tree/main/Games/Pop_My_Balloon) | [Color_Blast](https://github.com/kunjgit/GameZone/tree/main/Games/Color_Blast) | -| [Maze_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Maze_Game) | [Coloron](https://github.com/kunjgit/GameZone/tree/main/Games/Coloron). | +| [Maze_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Maze_Game) | [Coloron](https://github.com/kunjgit/GameZone/tree/main/Games/Coloron). | [Gobblet](https://github.com/kunjgit/GameZone/tree/main/Games/Gobblet) | | [Black_jackk](https://github.com/kunjgit/GameZone/tree/main/Games/Black_jackk) | [Emoji_Intruder](https://github.com/kunjgit/GameZone/tree/main/Games/Emoji_Intruder) | [Guess The Weapon](https://github.com/kunjgit/GameZone/tree/main/Games/Guess_The_Weapon) | [Guess Who](https://github.com/kunjgit/GameZone/tree/main/Games/Guess_Who) | | | | [Emoji_Intruder](https://github.com/kunjgit/GameZone/tree/main/Games/Emoji_Intruder) | [Guess The Weapon](https://github.com/kunjgit/GameZone/tree/main/Games/Guess_The_Weapon) | [Guess Who](https://github.com/kunjgit/GameZone/tree/main/Games/Guess_Who) | [Pop My Balloon](https://github.com/kunjgit/GameZone/tree/main/Games/Pop_My_Balloon) | | @@ -212,7 +213,7 @@ This repository also provides one such platforms where contributers come over an [Mancala_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Mancala_Game) | [Knife_hit](https://github.com/kunjgit/GameZone/tree/main/Games/Knife_hit) | | [Dice_Roller](https://github.com/kunjgit/GameZone/tree/main/Games/Dice_Roller) | [Chrome_Dino_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Chrome_Dino_Game) | -| [Rock_paper_scissor](https://github.com/kunjgit/GameZone/tree/main/Games/Rock_paper_scissor) | +| [Rock_paper_scissor](https://github.com/kunjgit/GameZone/tree/main/Games/Rock_paper_scissor) | [Sliding Puzzle](https://github.com/kunjgit/GameZone/tree/main/Games/Sliding_Puzzle) | | [City_Builder_Game](https://github.com/kunjgit/GameZone/tree/main/Games/City_Builder_Game) | | [Pokemon_Stats_Card](https://github.com/kunjgit/GameZone/tree/main/Games/Pokemon_Stats_Card) | | [Steampunk_FlappyBird](https://github.com/kunjgit/GameZone/tree/main/Games/Steampunk_FlappyBird) | @@ -320,12 +321,21 @@ This repository also provides one such platforms where contributers come over an | [Recognizing_Figures](https://github.com/kunjgit/GameZone/tree/main/Games/Recognizing_Figures) | [Screen Pet Game](https://github.com/kunjgit/GameZone/tree/main/Games/Screen-Pet-Game) | | [Sudoku_light_theme](https://github.com/kunjgit/GameZone/tree/main/Games/Sudoku_light_theme) | | [Find_the_ball](https://github.com/kunjgit/GameZone/tree/main/Games/Find_the_ball) | + +|[Color The Page](https://github.com/kunjgit/GameZone/tree/main/Games/Color_The_Page)| + +[Fidget Spinner Game](https://github.com/kunjgit/GameZone/tree/main/Games/Fidget_Spinner_Game)| | [Color The Page](https://github.com/kunjgit/GameZone/tree/main/Games/Color_The_Page)| |[Building Blocks Game](https://github.com/kunjgit/GameZone/tree/main/Games/Building_Block_Game)| |[Cartoon character guessing game](https://github.com/kunjgit/GameZone/tree/main/Games/Cartoon_Character_Guessing_Game)| + |[Carrom Board Game](https://github.com/kunjgit/GameZone/tree/main/Games/carrom)| | [Number_Recall_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Number_Recall_Game) | -| [Hit_the_hamster] (https://github.com/kunjgit/GameZone/tree/main/Games/Hit_the_hamster) | + + +| [Hit_the_hamster](https://github.com/kunjgit/GameZone/tree/main/Games/Hit_the_hamster) | + + | [Forest_Guardian](https://github.com/kunjgit/GameZone/tree/main/Games/Forst_Guardian) | | [Sudoku_light_theme](https://github.com/kunjgit/GameZone/tree/main/Games/Sudoku_light_theme) | | [Find_the_ball](https://github.com/kunjgit/GameZone/tree/main/Games/Find_the_ball) | @@ -345,14 +355,11 @@ This repository also provides one such platforms where contributers come over an |[Penguins Cant Fly](https://github.com/Will2Jacks/GameZoneForked/tree/Task/Games/Penguins_Cant_Fly)| |[GoFish](https://github.com/kunjgit/GameZone/tree/main/Games/GoFish)| | [Taash_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Taash_Game)| - | [Intellect Quest](https://github.com/Will2Jacks/GameZoneForked/tree/Task/Games/Intellect_Quest) | | [Number_Guessing_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Number_Guessing_Game) | | [Modulo_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Modulo_Game) | - -======= +| [Alien_Invasion](https://github.com/kunjgit/GameZone/tree/main/Games/Alien_Invasion) | | [Drawing_App](https://github.com/kunjgit/GameZone/tree/main/Games/Drawing_app) | - |[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) | @@ -799,6 +806,7 @@ This repository also provides one such platforms where contributers come over an | [Bouncing Ball Game](https://github.com/kunjgit/GameZone/tree/main/Games/Bouncing_Ball_Game) | |[Harmony_Mixer](https://github.com/kunjgit/GameZone/tree/main/Games/Harmony_Mixer)| |[Car_Racing_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Car_Racing_Game)| +|[KeySymphony](https://github.com/kunjgit/GameZone/tree/main/Games/KeySymphony)| |[Math_Race_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Math_Race_Game)| | [Bunny is Lost](https://github.com/kunjgit/GameZone/tree/main/Games/Bunny_is_Lost)| |[Steam_Punk](https://github.com/kunjgit/GameZone/tree/main/Games/Steam_Punk)| @@ -809,6 +817,7 @@ This repository also provides one such platforms where contributers come over an |[Dot_Box_Game](https://github.com/kunjgit/GameZone/tree/main/Games/Dot_Box_Game)| | [Cosmic_Blast](https://github.com/kunjgit/GameZone/tree/main/Games/Cosmic_Blast) | |[Mole](https://github.com/taneeshaa15/GameZone/tree/main/Games/Mole)| +|[Spell Bee](https://github.com/kunjgit/GameZone/tree/main/Games/Spell_Bee)| | [Go-fish-master](https://github.com/kunjgit/GameZone/tree/main/Games/Go-fish-master) | |[Pottery-Game](https://github.com/kunjgit/GameZone/tree/main/Games/Pottery-Game)| | [Ganesh_QR_Maker](https://github.com/kunjgit/GameZone/tree/main/Games/Ganesh_QR_Maker) | diff --git a/assets/images/Alien_Invasion.png b/assets/images/Alien_Invasion.png new file mode 100644 index 0000000000..8629cd684e Binary files /dev/null and b/assets/images/Alien_Invasion.png differ diff --git a/assets/images/Fidget.png b/assets/images/Fidget.png new file mode 100644 index 0000000000..1f825166d8 Binary files /dev/null and b/assets/images/Fidget.png differ diff --git a/assets/images/Gobblet.png b/assets/images/Gobblet.png new file mode 100644 index 0000000000..b48cf2f787 Binary files /dev/null and b/assets/images/Gobblet.png differ diff --git a/assets/images/Gobblet.webp b/assets/images/Gobblet.webp new file mode 100644 index 0000000000..f8e2b03dbf Binary files /dev/null and b/assets/images/Gobblet.webp differ diff --git a/assets/images/KeySymphony.png b/assets/images/KeySymphony.png new file mode 100644 index 0000000000..31bf050d89 Binary files /dev/null and b/assets/images/KeySymphony.png differ diff --git a/assets/images/KeySymphony2.png b/assets/images/KeySymphony2.png new file mode 100644 index 0000000000..0a1cad69cb Binary files /dev/null and b/assets/images/KeySymphony2.png differ diff --git a/assets/images/Sliding_Game.png b/assets/images/Sliding_Game.png new file mode 100644 index 0000000000..d007f76594 Binary files /dev/null and b/assets/images/Sliding_Game.png differ diff --git a/assets/images/spell_bee.png b/assets/images/spell_bee.png new file mode 100644 index 0000000000..87720cc939 Binary files /dev/null and b/assets/images/spell_bee.png differ diff --git a/assets/js/gamesData.json b/assets/js/gamesData.json index ef609c568f..32b08e10b6 100644 --- a/assets/js/gamesData.json +++ b/assets/js/gamesData.json @@ -2000,6 +2000,136 @@ "thumbnailUrl": "Dot_Connect.png" }, + +"396":{ + "gameTitle": "path finder puzzle", + "gameUrl": "path_finder", + "thumbnailUrl": "pathfinder.png" +}, +"414":{ + "gameTitle": "NameFate", + "gameUrl": "namefate", + "thumbnailUrl": "namefate.png" +} +, +"500":{ + "gameTitle": "Menja block breaker", + "gameUrl": "Menja_block_breaker", + "thumbnailUrl": "menja_Block_breaker.png" +}, +"393":{ + + "gameTitle": "Pop My Balloon", + "gameUrl": "Pop_My_Balloon", + "thumbnailUrl": "Pop_My_Balloon.png" + +}, +"397":{ + "gameTitle": "Tower Stack", + "gameUrl": "Tower_Stack", + "thumbnailUrl": "Tower_Stack.png" + +}, +"395":{ + + "gameTitle": "Virtual Pet Game", + "gameUrl": "Virtual_Pet_Game", + "thumbnailUrl": "Virtual_Pet_Game.png" + + "gameTitle": "path finder puzzle", + "gameUrl": "path_finder", + "thumbnailUrl": "pathfinder.png" +}, +"411":{ "gameTitle": "Tiny Fishing", +"gameUrl": "Tiny_Fishing", +"thumbnailUrl": "Tiny_Fishing.png" +}, +"398":{ +"410":{ + "gameTitle": "Shrek Vs Wild", + "gameUrl": "Shrek_Vs_Wild", + "thumbnailUrl": "Shrek_Vs_Wild.png" +}, +"409":{ + "gameTitle": "Hover_Board_Effect", + "gameUrl": "Hover_Board_Effect", + "thumbnailUrl": "Hover_Board_Effect.png" +}, +"405":{ + "gameTitle": "Candy_Crush_Saga", + "gameUrl": "Candy_Crush_Saga", + "thumbnailUrl": "Candy_Crush_Saga.png" +},"419":{ + + "gameTitle": "16_Puzzle", + "gameUrl": "16_Puzzle", + "thumbnailUrl": "16_Puzzle.png" +}, +"420":{ + "gameTitle" : "Colour_Generator_Game", + "gameUrl": "Colour_Generator_Game", + "thumbnailUrl": "Colour_Generator_Game.png" + }, +"406":{ + "gameTitle": "Knife_hit", + "gameUrl": "Knife_hit", + "thumbnailUrl": "Knife_hit.png" +},"415":{ + "gameTitle": "Anagram_Checker_Game", + "gameUrl": "Anagram_Checker_Game", + "thumbnailUrl": "Anagram_Checker_Game.png" + +}, +"407":{ + "gameTitle": "Screen_Pet_Game", + "gameUrl": "Screen_Pet_Game", + "thumbnailUrl": "Screen_Pet_Game.png" + +},"416":{ + + + "gameTitle": "rapid_click_frenzy", + "gameUrl": "rapid_click_frenzy", + "thumbnailUrl": "rapidgame.png" + + + +} + ,"408":{ + "gameTitle": "Pen_Pointer_Fight", + "gameUrl": "PenPointerFight", + "thumbnailUrl": "PenPointerFight.png" + }, +"409":{ + "gameTitle": "Guess_The_Song", + "gameUrl": "Guess_The_Song", + "thumbnailUrl": "Guess_The_Song.png" +} + +},"418":{ + "gameTitle": "Brick Buster", + "gameUrl": "Brick Buster", + "thumbnailUrl": "Brick.png" + } + + + +},"410":{ + "gameTitle": "Brick Buster", + "gameUrl": "Brick Buster", + "thumbnailUrl": "Brick.png" + }, + "419":{ + "gameTitle": "Soccer", + "gameUrl": "Soccer", + "thumbnailUrl": "Soccer" +}, +"411":{"gameTitle": "Pen_Pointer_Fight", +"gameUrl": "PenPointerFight", +"thumbnailUrl": "PenPointerFight.png" +}, + + "398": { "gameTitle": "path finder puzzle", "gameUrl": "path_finder", @@ -2101,6 +2231,7 @@ "thumbnailUrl": "MathQuiz.png" }, "418":{ + "gameTitle": "MathQuiz", "gameUrl": "MathQuiz", "thumbnailUrl": "MathQuiz.png" @@ -2109,16 +2240,21 @@ "gameTitle":"Puzzle-Game", "gameUrl":"puzzle-game", "thumbnailUrl":"puzzle-game.png" -} -<<<<<<< HEAD +}, + + + "419":{ "gameTitle": "Pottery", "gameUrl": "Pottery-Game", "thumbnailUrl": "Pottery.png" -======= ->>>>>>> c24ab932e1702441882a65b80d713ea232e18c46 - -} -} +}, +"421":{ + "gameTitle":"Fidget_Spinner_Game", + "gameUrl":"Fidget_Spinner_Game", + "thumbnailUrl":"Fidget.png" +}, + +