From b0b7631dcbe7f53140d3fd6d6aafa11e35e17602 Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sat, 15 Jun 2024 14:37:30 +0200 Subject: [PATCH 01/22] First basics of pac man - pac man collects points and the dots disappear - ghosts exist and wander around --- PacMan/index.html | 22 ++++++ PacMan/jscrpt.js | 168 ++++++++++++++++++++++++++++++++++++++++++++++ PacMan/style.css | 91 +++++++++++++++++++++++++ 3 files changed, 281 insertions(+) create mode 100644 PacMan/index.html create mode 100644 PacMan/jscrpt.js create mode 100644 PacMan/style.css diff --git a/PacMan/index.html b/PacMan/index.html new file mode 100644 index 0000000000..1ef0d9ca8c --- /dev/null +++ b/PacMan/index.html @@ -0,0 +1,22 @@ + + + + + + + Pac-Man Game + + + + + + +
+ + +
Score: 0
+ + + + + diff --git a/PacMan/jscrpt.js b/PacMan/jscrpt.js new file mode 100644 index 0000000000..8f55546a3c --- /dev/null +++ b/PacMan/jscrpt.js @@ -0,0 +1,168 @@ +document.addEventListener('DOMContentLoaded', () => { + // Get the game board element + const gameBoard = document.getElementById('gameBoard'); + + // Initialize variables + const grid = []; // Array to hold the grid cells + const rows = 20; // Number of rows in the grid + const cols = 20; // Number of columns in the grid + let score = 0; // Player's score + const totalPacDots = document.querySelectorAll('.pac-dot').length; // Total number of pac-dots in the game + + // Level layout (0 = empty, 1 = wall, 2 = pac-dot) + const layout = [ + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, + 1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1, + 1,2,1,1,1,1,1,2,1,1,2,1,1,2,1,1,1,1,2,1, + 1,2,2,2,2,2,2,2,1,2,2,2,1,2,1,2,2,2,2,1, + 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,1, + 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,1, + 1,2,2,2,1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1, + 1,1,1,2,1,1,1,1,1,2,1,1,1,1,1,2,1,1,1,1, + 1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1, + 1,2,1,1,1,2,1,1,1,1,1,1,1,1,2,1,1,1,2,1, + 1,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,1, + 1,2,1,2,1,1,1,1,1,1,1,1,1,2,1,1,1,1,2,1, + 1,2,1,2,2,2,2,2,2,2,2,2,2,2,1,2,2,2,2,1, + 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,1,2,1, + 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,2,2,2,1, + 1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,2,1,1,1,1, + 1,2,2,2,2,2,2,2,1,2,2,2,1,2,2,2,2,2,2,1, + 1,2,1,1,1,1,1,2,1,2,1,2,1,2,1,1,1,1,2,1, + 1,2,2,2,2,2,2,2,2,2,1,2,2,2,2,2,2,2,2,1, + 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 + ]; + +// Create the gameboard +layout.forEach((cell, index) => { + const div = document.createElement('div'); // Create a new div element for each cell + div.classList.add('cell'); // Add the 'cell' class to the div + + // Add wall class if the cell is a wall, pac-dot class if the cell contains a pac-dot + if (cell === 1) { + div.classList.add('wall'); // Add the 'wall' class to the div if the cell represents a wall + } else if (cell === 2) { + div.classList.add('pac-dot'); // Add the 'pac-dot' class to the div if the cell contains a pac-dot + } + + gameBoard.appendChild(div); // Add the div to the game board element in the HTML + grid.push(div); // Add the div element to the grid array for tracking +}); + + // Place Pac-Man + let pacmanCurrentIndex = 21; // Set Pac-Man's initial position to index 21 + grid[pacmanCurrentIndex].classList.add('pacman'); // Add 'pacman' class to the cell at Pac-Man's initial position + + // Remove pac-dot at initial position if present + if (grid[pacmanCurrentIndex].classList.contains('pac-dot')) { + grid[pacmanCurrentIndex].classList.remove('pac-dot'); // Remove 'pac-dot' class if present at Pac-Man's initial position + score += 10; // Increase the score by 10 points + console.log('Score:', score); // Output the current score to the console +} + +// Function to move Pac-Man +const movePacman = () => { + if (direction !== null) { + let newIndex = pacmanCurrentIndex; // Initialize newIndex with the current Pac-Man index + + // Move Pac-Man based on the current direction + switch (direction) { + case 'ArrowUp': // Move Pac-Man up if the direction is 'ArrowUp' + // Check if moving up is possible and there is no wall in the way + if (pacmanCurrentIndex - cols >= 0 && !grid[pacmanCurrentIndex - cols].classList.contains('wall')) { + newIndex -= cols; // Move Pac-Man up by one row + } + break; + case 'ArrowDown': // Move Pac-Man down if the direction is 'ArrowDown' + // Check if moving down is possible and there is no wall in the way + if (pacmanCurrentIndex + cols < cols * rows && !grid[pacmanCurrentIndex + cols].classList.contains('wall')) { + newIndex += cols; // Move Pac-Man down by one row + } + break; + case 'ArrowLeft': // Move Pac-Man left if the direction is 'ArrowLeft' + // Check if moving left is possible and there is no wall in the way + if (pacmanCurrentIndex % cols !== 0 && !grid[pacmanCurrentIndex - 1].classList.contains('wall')) { + newIndex -= 1; // Move Pac-Man left by one column + } + break; + case 'ArrowRight': // Move Pac-Man right if the direction is 'ArrowRight' + // Check if moving right is possible and there is no wall in the way + if (pacmanCurrentIndex % cols < cols - 1 && !grid[pacmanCurrentIndex + 1].classList.contains('wall')) { + newIndex += 1; // Move Pac-Man right by one column + } + break; + } + + // Check if Pac-Man's position has changed + if (newIndex !== pacmanCurrentIndex) { + // Remove Pac-Man from the current position + grid[pacmanCurrentIndex].classList.remove('pacman'); + pacmanCurrentIndex = newIndex; // Update Pac-Man's current index + grid[pacmanCurrentIndex].classList.add('pacman'); // Add Pac-Man to the new position + + // Check if Pac-Man has eaten a pac-dot + if (grid[pacmanCurrentIndex].classList.contains('pac-dot')) { + grid[pacmanCurrentIndex].classList.remove('pac-dot'); // Remove the pac-dot + score += 10; // Increase the score + document.getElementById('scoreValue').textContent = score; // Update the score display + console.log('Score:', score); + + // Check if all pac-dots are collected + if (score === totalPacDots * 10) { + console.log('Congratulations! You won!'); + } + } + } + } + }; + + // Check for keydown events to set Pac-Man's direction + document.addEventListener('keydown', (event) => { + const key = event.key; + if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(key)) { + direction = key; // Set Pac-Man's direction based on the pressed key + } + }); + + // Game loop + setInterval(movePacman, 200); // Move Pac-Man every 200ms + + //Ghost + class Ghost { + constructor(startIndex, color) { + // Initialize Ghost + this.currentIndex = startIndex; // Set the current index of the ghost + this.color = color; // Set the color of the ghost + } + + moveGhost() { + const directions = [-1, +1, -cols, +cols]; // Possible directions for the ghost + let direction = directions[Math.floor(Math.random() * directions.length)]; // Initial direction + + // Move the ghost at regular intervals + this.timerId = setInterval(() => { + // Logic for ghost movement + const nextMove = this.currentIndex + direction; // Calculate the next potential position for the ghost + if (!grid[nextMove].classList.contains('wall') && !grid[nextMove].classList.contains('ghost')) { // Check if next move isn't a wall + // Remove ghost from the current position + grid[this.currentIndex].classList.remove('ghost', this.color); + // Move the ghost to the next position + this.currentIndex = nextMove; + // Place the ghost on the new position + grid[this.currentIndex].classList.add('ghost', this.color); + } else { + // Choose a new random direction if the ghost can't move + direction = directions[Math.floor(Math.random() * directions.length)]; + } + }, 200); // Move Ghost every 200ms + } + } + + // Create ghosts + const ghost1 = new Ghost(209, 'red'); // Place the first ghost + const ghost2 = new Ghost(229, 'blue'); // Place the second ghost + + // Start ghost movement + ghost1.moveGhost(); + ghost2.moveGhost(); +}); \ No newline at end of file diff --git a/PacMan/style.css b/PacMan/style.css new file mode 100644 index 0000000000..8d8db15d71 --- /dev/null +++ b/PacMan/style.css @@ -0,0 +1,91 @@ +body { + /* Center align the content vertically and horizontally */ + display: flex; + justify-content: center; + align-items: center; + /* Set the height of the body to 100% of the viewport height */ + height: 100vh; + /* Remove margin to prevent unwanted spacing */ + margin: 0; + /* Set background color to black */ + background-color: #000; +} + +#gameBoard { + /* Create a grid layout for the game board */ + display: grid; + /* Define 20 columns each with a width of 30px */ + grid-template-columns: repeat(20, 30px); + /* Define 20 rows each with a height of 30px */ + grid-template-rows: repeat(20, 30px); + /* Set the gap between grid items */ + gap: 2px; +} + +.cell { + width: 30px; + height: 30px; +} + +.wall { + background-color: blue; +} + +/*Space for the pac dots*/ +.pac-dot { + background-color: black; + /* Center align content vertically and horizontally */ + display: flex; + justify-content: center; + align-items: center; +} + +/*Pac dots themselves*/ +.pac-dot::after { + /*Create circle*/ + content: ''; + width: 10px; + height: 10px; + + background-color: white; + /*Create a rounded shape*/ + border-radius: 50%; +} + +/*Pac-Man*/ +.pacman { + background-color: yellow; + /*Create a round shape*/ + border-radius: 50%; +} + +/*Score display*/ +#score { + font-size: 24px; + font-weight: bold; + color: white; + background-color: black; + padding: 10px; +} + +/*Score value*/ +#scoreValue { + color: yellow; +} + + +/*Ghosts*/ +.ghost { + /*Set background color dynamically*/ + background-color: var(--ghost-color); +} + +/*Red ghost*/ +.red { + --ghost-color: red; +} + +/*Blue ghost*/ +.blue { + --ghost-color: green; +} From 22bc978e849ba3229d2a02b3e8e855d7cf5896ff Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sat, 15 Jun 2024 15:33:59 +0200 Subject: [PATCH 02/22] Ghost movements -improved ghost movements -ghosts follow pacman --- PacMan/jscrpt.js | 63 +++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 51 insertions(+), 12 deletions(-) diff --git a/PacMan/jscrpt.js b/PacMan/jscrpt.js index 8f55546a3c..edb0b9c392 100644 --- a/PacMan/jscrpt.js +++ b/PacMan/jscrpt.js @@ -137,22 +137,61 @@ const movePacman = () => { moveGhost() { const directions = [-1, +1, -cols, +cols]; // Possible directions for the ghost - let direction = directions[Math.floor(Math.random() * directions.length)]; // Initial direction - + + // Function to calculate distance between two indices on the grid + const distanceToPacman = (ghostIndex, pacmanIndex) => { + const ghostRow = Math.floor(ghostIndex / cols); + const ghostCol = ghostIndex % cols; + const pacmanRow = Math.floor(pacmanIndex / cols); + const pacmanCol = pacmanIndex % cols; + return Math.abs(ghostRow - pacmanRow) + Math.abs(ghostCol - pacmanCol); + }; + + // Function to choose the best direction towards Pac-Man + const chooseDirection = () => { + // Get Pac-Man's current index + const pacmanIndex = grid.findIndex(cell => cell.classList.contains('pacman')); + + // Calculate distances for each direction and filter out invalid moves + const validDirections = directions.filter(direction => { + const nextMove = this.currentIndex + direction; + return !grid[nextMove].classList.contains('wall') && !grid[nextMove].classList.contains('ghost'); + }); + + // Sort directions by distance to Pac-Man + validDirections.sort((dir1, dir2) => { + const nextMove1 = this.currentIndex + dir1; + const nextMove2 = this.currentIndex + dir2; + return distanceToPacman(nextMove1, pacmanIndex) - distanceToPacman(nextMove2, pacmanIndex); + }); + + // Return the closest direction if available + return validDirections.length > 0 ? validDirections[0] : null; + }; + + let direction = chooseDirection(); // Initial direction + // Move the ghost at regular intervals this.timerId = setInterval(() => { // Logic for ghost movement - const nextMove = this.currentIndex + direction; // Calculate the next potential position for the ghost - if (!grid[nextMove].classList.contains('wall') && !grid[nextMove].classList.contains('ghost')) { // Check if next move isn't a wall - // Remove ghost from the current position - grid[this.currentIndex].classList.remove('ghost', this.color); - // Move the ghost to the next position - this.currentIndex = nextMove; - // Place the ghost on the new position - grid[this.currentIndex].classList.add('ghost', this.color); + if (direction !== null) { + const nextMove = this.currentIndex + direction; // Calculate the next potential position for the ghost + + // Check if next move isn't a wall or another ghost + if (!grid[nextMove].classList.contains('wall') && !grid[nextMove].classList.contains('ghost')) { + // Remove ghost from the current position + grid[this.currentIndex].classList.remove('ghost', this.color); + // Move the ghost to the next position + this.currentIndex = nextMove; + // Place the ghost on the new position + grid[this.currentIndex].classList.add('ghost', this.color); + } else { + // Choose a new direction if the ghost can't move + direction = chooseDirection(); + } } else { - // Choose a new random direction if the ghost can't move - direction = directions[Math.floor(Math.random() * directions.length)]; + // Choose a new direction if no valid direction is found + direction = chooseDirection(); } }, 200); // Move Ghost every 200ms } From e0d9d10e93af373573050b05639cfd6d8bf9b140 Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sat, 15 Jun 2024 16:50:04 +0200 Subject: [PATCH 03/22] Stopping game -Game stops when player wins (using 200 score for test) -Game stops when player is touched by ghost --- PacMan/jscrpt.js | 223 +++++++++++++++++++++++++++++------------------ 1 file changed, 137 insertions(+), 86 deletions(-) diff --git a/PacMan/jscrpt.js b/PacMan/jscrpt.js index edb0b9c392..b03afda5ca 100644 --- a/PacMan/jscrpt.js +++ b/PacMan/jscrpt.js @@ -7,7 +7,8 @@ document.addEventListener('DOMContentLoaded', () => { const rows = 20; // Number of rows in the grid const cols = 20; // Number of columns in the grid let score = 0; // Player's score - const totalPacDots = document.querySelectorAll('.pac-dot').length; // Total number of pac-dots in the game + let totalPacDots = 0; // Total number of pac-dots in the game + let gameOver = false; // Flag to track game over state // Level layout (0 = empty, 1 = wall, 2 = pac-dot) const layout = [ @@ -33,21 +34,22 @@ document.addEventListener('DOMContentLoaded', () => { 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 ]; -// Create the gameboard -layout.forEach((cell, index) => { - const div = document.createElement('div'); // Create a new div element for each cell - div.classList.add('cell'); // Add the 'cell' class to the div + // Create the gameboard + layout.forEach((cell, index) => { + const div = document.createElement('div'); // Create a new div element for each cell + div.classList.add('cell'); // Add the 'cell' class to the div - // Add wall class if the cell is a wall, pac-dot class if the cell contains a pac-dot - if (cell === 1) { - div.classList.add('wall'); // Add the 'wall' class to the div if the cell represents a wall - } else if (cell === 2) { - div.classList.add('pac-dot'); // Add the 'pac-dot' class to the div if the cell contains a pac-dot - } + // Add wall class if the cell is a wall, pac-dot class if the cell contains a pac-dot + if (cell === 1) { + div.classList.add('wall'); // Add the 'wall' class to the div if the cell represents a wall + } else if (cell === 2) { + div.classList.add('pac-dot'); // Add the 'pac-dot' class to the div if the cell contains a pac-dot + totalPacDots++; // Increment totalPacDots for each pac-dot found + } - gameBoard.appendChild(div); // Add the div to the game board element in the HTML - grid.push(div); // Add the div element to the grid array for tracking -}); + gameBoard.appendChild(div); // Add the div to the game board element in the HTML + grid.push(div); // Add the div element to the grid array for tracking + }); // Place Pac-Man let pacmanCurrentIndex = 21; // Set Pac-Man's initial position to index 21 @@ -55,68 +57,91 @@ layout.forEach((cell, index) => { // Remove pac-dot at initial position if present if (grid[pacmanCurrentIndex].classList.contains('pac-dot')) { - grid[pacmanCurrentIndex].classList.remove('pac-dot'); // Remove 'pac-dot' class if present at Pac-Man's initial position - score += 10; // Increase the score by 10 points - console.log('Score:', score); // Output the current score to the console -} - -// Function to move Pac-Man -const movePacman = () => { - if (direction !== null) { - let newIndex = pacmanCurrentIndex; // Initialize newIndex with the current Pac-Man index - - // Move Pac-Man based on the current direction - switch (direction) { - case 'ArrowUp': // Move Pac-Man up if the direction is 'ArrowUp' - // Check if moving up is possible and there is no wall in the way - if (pacmanCurrentIndex - cols >= 0 && !grid[pacmanCurrentIndex - cols].classList.contains('wall')) { - newIndex -= cols; // Move Pac-Man up by one row - } - break; - case 'ArrowDown': // Move Pac-Man down if the direction is 'ArrowDown' - // Check if moving down is possible and there is no wall in the way - if (pacmanCurrentIndex + cols < cols * rows && !grid[pacmanCurrentIndex + cols].classList.contains('wall')) { - newIndex += cols; // Move Pac-Man down by one row - } - break; - case 'ArrowLeft': // Move Pac-Man left if the direction is 'ArrowLeft' - // Check if moving left is possible and there is no wall in the way - if (pacmanCurrentIndex % cols !== 0 && !grid[pacmanCurrentIndex - 1].classList.contains('wall')) { - newIndex -= 1; // Move Pac-Man left by one column - } - break; - case 'ArrowRight': // Move Pac-Man right if the direction is 'ArrowRight' - // Check if moving right is possible and there is no wall in the way - if (pacmanCurrentIndex % cols < cols - 1 && !grid[pacmanCurrentIndex + 1].classList.contains('wall')) { - newIndex += 1; // Move Pac-Man right by one column - } - break; - } + grid[pacmanCurrentIndex].classList.remove('pac-dot'); // Remove 'pac-dot' class if present at Pac-Man's initial position + score += 10; // Increase the score by 10 points + document.getElementById('scoreValue').textContent = score; // Update the score display + console.log('Score:', score); // Output the current score to the console + } - // Check if Pac-Man's position has changed - if (newIndex !== pacmanCurrentIndex) { - // Remove Pac-Man from the current position - grid[pacmanCurrentIndex].classList.remove('pacman'); - pacmanCurrentIndex = newIndex; // Update Pac-Man's current index - grid[pacmanCurrentIndex].classList.add('pacman'); // Add Pac-Man to the new position - - // Check if Pac-Man has eaten a pac-dot - if (grid[pacmanCurrentIndex].classList.contains('pac-dot')) { - grid[pacmanCurrentIndex].classList.remove('pac-dot'); // Remove the pac-dot - score += 10; // Increase the score - document.getElementById('scoreValue').textContent = score; // Update the score display - console.log('Score:', score); - - // Check if all pac-dots are collected - if (score === totalPacDots * 10) { - console.log('Congratulations! You won!'); - } + // Function to move Pac-Man + const movePacman = () => { + if (!gameOver && direction !== null) { + let newIndex = pacmanCurrentIndex; // Initialize newIndex with the current Pac-Man index + + // Move Pac-Man based on the current direction + switch (direction) { + case 'ArrowUp': // Move Pac-Man up if the direction is 'ArrowUp' + // Check if moving up is possible and there is no wall in the way + if (pacmanCurrentIndex - cols >= 0 && !grid[pacmanCurrentIndex - cols].classList.contains('wall')) { + newIndex -= cols; // Move Pac-Man up by one row + } + break; + case 'ArrowDown': // Move Pac-Man down if the direction is 'ArrowDown' + // Check if moving down is possible and there is no wall in the way + if (pacmanCurrentIndex + cols < cols * rows && !grid[pacmanCurrentIndex + cols].classList.contains('wall')) { + newIndex += cols; // Move Pac-Man down by one row + } + break; + case 'ArrowLeft': // Move Pac-Man left if the direction is 'ArrowLeft' + // Check if moving left is possible and there is no wall in the way + if (pacmanCurrentIndex % cols !== 0 && !grid[pacmanCurrentIndex - 1].classList.contains('wall')) { + newIndex -= 1; // Move Pac-Man left by one column + } + break; + case 'ArrowRight': // Move Pac-Man right if the direction is 'ArrowRight' + // Check if moving right is possible and there is no wall in the way + if (pacmanCurrentIndex % cols < cols - 1 && !grid[pacmanCurrentIndex + 1].classList.contains('wall')) { + newIndex += 1; // Move Pac-Man right by one column + } + break; + } + + // Check if Pac-Man's position has changed + if (newIndex !== pacmanCurrentIndex) { + // Remove Pac-Man from the current position + grid[pacmanCurrentIndex].classList.remove('pacman'); + pacmanCurrentIndex = newIndex; // Update Pac-Man's current index + grid[pacmanCurrentIndex].classList.add('pacman'); // Add Pac-Man to the new position + + // Check if Pac-Man has eaten a pac-dot + if (grid[pacmanCurrentIndex].classList.contains('pac-dot')) { + grid[pacmanCurrentIndex].classList.remove('pac-dot'); // Remove the pac-dot + score += 10; // Increase the score + document.getElementById('scoreValue').textContent = score; // Update the score display + console.log('Score:', score); + + // Call checkForWin function after updating score + checkForWin(); } } } }; + // Function to check for win condition + const checkForWin = () => { + if (score === 200) { // Aanpassen naar de gewenste winvoorwaarde + clearInterval(gameLoop); // Stop the game loop + + // Stop ghost movements + ghost1.stop(); + ghost2.stop(); + + // Display win message after a short delay + setTimeout(() => { + alert("Congratulations! You won!"); + }, 500); + + gameOver = true; // Set game over flag + clearInterval(gameLoop); // Stop the game loop + + // Optionally, reset the game here if needed + resetGame(); + } +}; + + // Check for keydown events to set Pac-Man's direction + let direction = null; // Initialize direction as null document.addEventListener('keydown', (event) => { const key = event.key; if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(key)) { @@ -124,20 +149,38 @@ const movePacman = () => { } }); + // Function to end the game + const endGame = (isWin) => { + gameOver = true; // Set game over flag + clearInterval(gameLoop); // Stop the game loop + + // Stop ghost movements + ghost1.stop(); + ghost2.stop(); + + // Display game over message + const message = isWin ? 'Congratulations! You won!' : 'Game over! You lost!'; + alert(message); // Display a simple alert message + + // Optionally, you could reset the game here if needed + resetGame(); + }; + // Game loop - setInterval(movePacman, 200); // Move Pac-Man every 200ms + const gameLoop = setInterval(movePacman, 200); // Move Pac-Man every 200ms - //Ghost + // Ghost class Ghost { constructor(startIndex, color) { // Initialize Ghost this.currentIndex = startIndex; // Set the current index of the ghost this.color = color; // Set the color of the ghost - } + this.timerId = null; // Timer ID for ghost movement interval + } moveGhost() { const directions = [-1, +1, -cols, +cols]; // Possible directions for the ghost - + // Function to calculate distance between two indices on the grid const distanceToPacman = (ghostIndex, pacmanIndex) => { const ghostRow = Math.floor(ghostIndex / cols); @@ -146,37 +189,37 @@ const movePacman = () => { const pacmanCol = pacmanIndex % cols; return Math.abs(ghostRow - pacmanRow) + Math.abs(ghostCol - pacmanCol); }; - + // Function to choose the best direction towards Pac-Man const chooseDirection = () => { // Get Pac-Man's current index const pacmanIndex = grid.findIndex(cell => cell.classList.contains('pacman')); - + // Calculate distances for each direction and filter out invalid moves const validDirections = directions.filter(direction => { const nextMove = this.currentIndex + direction; return !grid[nextMove].classList.contains('wall') && !grid[nextMove].classList.contains('ghost'); }); - + // Sort directions by distance to Pac-Man validDirections.sort((dir1, dir2) => { const nextMove1 = this.currentIndex + dir1; const nextMove2 = this.currentIndex + dir2; return distanceToPacman(nextMove1, pacmanIndex) - distanceToPacman(nextMove2, pacmanIndex); }); - + // Return the closest direction if available return validDirections.length > 0 ? validDirections[0] : null; }; - + let direction = chooseDirection(); // Initial direction - + // Move the ghost at regular intervals this.timerId = setInterval(() => { // Logic for ghost movement - if (direction !== null) { + if (!gameOver && direction !== null) { const nextMove = this.currentIndex + direction; // Calculate the next potential position for the ghost - + // Check if next move isn't a wall or another ghost if (!grid[nextMove].classList.contains('wall') && !grid[nextMove].classList.contains('ghost')) { // Remove ghost from the current position @@ -189,14 +232,21 @@ const movePacman = () => { // Choose a new direction if the ghost can't move direction = chooseDirection(); } - } else { - // Choose a new direction if no valid direction is found - direction = chooseDirection(); + + // Check if the ghost touched Pac-Man + if (this.currentIndex === pacmanCurrentIndex) { + gameOver = true; + endGame(false); // Pac-Man loses + } } }, 200); // Move Ghost every 200ms } + + stop() { + clearInterval(this.timerId); // Stop the ghost movement + } } - + // Create ghosts const ghost1 = new Ghost(209, 'red'); // Place the first ghost const ghost2 = new Ghost(229, 'blue'); // Place the second ghost @@ -204,4 +254,5 @@ const movePacman = () => { // Start ghost movement ghost1.moveGhost(); ghost2.moveGhost(); -}); \ No newline at end of file +}); + From 655f6600058844119de0ca040c4b259594e23763 Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sat, 15 Jun 2024 17:11:36 +0200 Subject: [PATCH 04/22] Update Update gamewin --- PacMan/jscrpt.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/PacMan/jscrpt.js b/PacMan/jscrpt.js index b03afda5ca..e0254a712d 100644 --- a/PacMan/jscrpt.js +++ b/PacMan/jscrpt.js @@ -120,6 +120,7 @@ document.addEventListener('DOMContentLoaded', () => { // Function to check for win condition const checkForWin = () => { if (score === 200) { // Aanpassen naar de gewenste winvoorwaarde + gameOver = true; // Set game over flag clearInterval(gameLoop); // Stop the game loop // Stop ghost movements @@ -131,15 +132,11 @@ document.addEventListener('DOMContentLoaded', () => { alert("Congratulations! You won!"); }, 500); - gameOver = true; // Set game over flag - clearInterval(gameLoop); // Stop the game loop - // Optionally, reset the game here if needed resetGame(); } }; - // Check for keydown events to set Pac-Man's direction let direction = null; // Initialize direction as null document.addEventListener('keydown', (event) => { From 89eacc9b5765891b6b81dc2c3420cf9e4866b866 Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sat, 15 Jun 2024 18:05:22 +0200 Subject: [PATCH 05/22] Small code updates --- PacMan/jscrpt.js | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/PacMan/jscrpt.js b/PacMan/jscrpt.js index e0254a712d..2b19aea9b3 100644 --- a/PacMan/jscrpt.js +++ b/PacMan/jscrpt.js @@ -119,7 +119,7 @@ document.addEventListener('DOMContentLoaded', () => { // Function to check for win condition const checkForWin = () => { - if (score === 200) { // Aanpassen naar de gewenste winvoorwaarde + if (score === 300) { // Total score won gameOver = true; // Set game over flag clearInterval(gameLoop); // Stop the game loop @@ -132,7 +132,7 @@ document.addEventListener('DOMContentLoaded', () => { alert("Congratulations! You won!"); }, 500); - // Optionally, reset the game here if needed + // Reset the game resetGame(); } }; @@ -156,10 +156,12 @@ document.addEventListener('DOMContentLoaded', () => { ghost2.stop(); // Display game over message - const message = isWin ? 'Congratulations! You won!' : 'Game over! You lost!'; - alert(message); // Display a simple alert message + // Display win message after a short delay + setTimeout(() => { + alert("Game over! You lost!"); + }, 500); - // Optionally, you could reset the game here if needed + // Reset the game resetGame(); }; @@ -251,5 +253,4 @@ document.addEventListener('DOMContentLoaded', () => { // Start ghost movement ghost1.moveGhost(); ghost2.moveGhost(); -}); - +}); \ No newline at end of file From 3a69bbfa508e106605895cc138b7896d0914b381 Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sat, 15 Jun 2024 18:30:41 +0200 Subject: [PATCH 06/22] Update comment --- PacMan/jscrpt.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/PacMan/jscrpt.js b/PacMan/jscrpt.js index 2b19aea9b3..78d14b4ac7 100644 --- a/PacMan/jscrpt.js +++ b/PacMan/jscrpt.js @@ -154,10 +154,9 @@ document.addEventListener('DOMContentLoaded', () => { // Stop ghost movements ghost1.stop(); ghost2.stop(); - - // Display game over message - // Display win message after a short delay - setTimeout(() => { + + // Display win message after a short delay + setTimeout(() => { alert("Game over! You lost!"); }, 500); From dea6e13aef33716e2c96932d62146a0346831e92 Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sat, 15 Jun 2024 23:13:54 +0200 Subject: [PATCH 07/22] Game ends -game ends when player wins -game ends when lives are up and ghost gets the player -display lives --- PacMan/index.html | 6 + PacMan/jscrpt.js | 315 +++++++++++++++++++++++++++------------------- PacMan/style.css | 18 +++ 3 files changed, 212 insertions(+), 127 deletions(-) diff --git a/PacMan/index.html b/PacMan/index.html index 1ef0d9ca8c..2a7dd4a7fc 100644 --- a/PacMan/index.html +++ b/PacMan/index.html @@ -15,6 +15,12 @@
Score: 0
+ +
+ Lives: + + +
diff --git a/PacMan/jscrpt.js b/PacMan/jscrpt.js index 78d14b4ac7..a4c35a2e8a 100644 --- a/PacMan/jscrpt.js +++ b/PacMan/jscrpt.js @@ -7,8 +7,10 @@ document.addEventListener('DOMContentLoaded', () => { const rows = 20; // Number of rows in the grid const cols = 20; // Number of columns in the grid let score = 0; // Player's score + let lives = 3; // Player's lives let totalPacDots = 0; // Total number of pac-dots in the game let gameOver = false; // Flag to track game over state + let gameLoop; // Variable to hold game loop interval // Level layout (0 = empty, 1 = wall, 2 = pac-dot) const layout = [ @@ -60,7 +62,6 @@ document.addEventListener('DOMContentLoaded', () => { grid[pacmanCurrentIndex].classList.remove('pac-dot'); // Remove 'pac-dot' class if present at Pac-Man's initial position score += 10; // Increase the score by 10 points document.getElementById('scoreValue').textContent = score; // Update the score display - console.log('Score:', score); // Output the current score to the console } // Function to move Pac-Man @@ -113,6 +114,15 @@ document.addEventListener('DOMContentLoaded', () => { // Call checkForWin function after updating score checkForWin(); } + + // Check for collision with ghosts after Pac-Man moves + checkCollision(); // Check collision after each move + } + + // Check if Pac-Man's position after movement ends the game + if (lives === 0) { + gameOver = true; + endGame(); // Game over } } }; @@ -120,136 +130,187 @@ document.addEventListener('DOMContentLoaded', () => { // Function to check for win condition const checkForWin = () => { if (score === 300) { // Total score won - gameOver = true; // Set game over flag - clearInterval(gameLoop); // Stop the game loop - - // Stop ghost movements - ghost1.stop(); - ghost2.stop(); - - // Display win message after a short delay - setTimeout(() => { - alert("Congratulations! You won!"); - }, 500); - - // Reset the game - resetGame(); - } -}; - - // Check for keydown events to set Pac-Man's direction - let direction = null; // Initialize direction as null - document.addEventListener('keydown', (event) => { - const key = event.key; - if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(key)) { - direction = key; // Set Pac-Man's direction based on the pressed key - } - }); - - // Function to end the game - const endGame = (isWin) => { - gameOver = true; // Set game over flag - clearInterval(gameLoop); // Stop the game loop - - // Stop ghost movements - ghost1.stop(); - ghost2.stop(); + gameOver = true; // Set game over flag + clearInterval(gameLoop); // Stop the game loop - // Display win message after a short delay - setTimeout(() => { - alert("Game over! You lost!"); - }, 500); - - // Reset the game - resetGame(); - }; - - // Game loop - const gameLoop = setInterval(movePacman, 200); // Move Pac-Man every 200ms + // Stop ghost movements + ghost1.stop(); + ghost2.stop(); + + // Display win message after a short delay + setTimeout(() => { + alert("Congratulations! You won!"); + }, 500); - // Ghost - class Ghost { - constructor(startIndex, color) { - // Initialize Ghost - this.currentIndex = startIndex; // Set the current index of the ghost - this.color = color; // Set the color of the ghost - this.timerId = null; // Timer ID for ghost movement interval } + }; + + // Check for keydown events to set Pac-Man's direction + let direction = null; // Initialize direction as null + document.addEventListener('keydown', (event) => { + const key = event.key; + if (['ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight'].includes(key)) { + direction = key; // Set Pac-Man's direction based on the pressed key + } + }); - moveGhost() { - const directions = [-1, +1, -cols, +cols]; // Possible directions for the ghost - - // Function to calculate distance between two indices on the grid - const distanceToPacman = (ghostIndex, pacmanIndex) => { - const ghostRow = Math.floor(ghostIndex / cols); - const ghostCol = ghostIndex % cols; - const pacmanRow = Math.floor(pacmanIndex / cols); - const pacmanCol = pacmanIndex % cols; - return Math.abs(ghostRow - pacmanRow) + Math.abs(ghostCol - pacmanCol); - }; - - // Function to choose the best direction towards Pac-Man - const chooseDirection = () => { - // Get Pac-Man's current index - const pacmanIndex = grid.findIndex(cell => cell.classList.contains('pacman')); - - // Calculate distances for each direction and filter out invalid moves - const validDirections = directions.filter(direction => { - const nextMove = this.currentIndex + direction; - return !grid[nextMove].classList.contains('wall') && !grid[nextMove].classList.contains('ghost'); - }); - - // Sort directions by distance to Pac-Man - validDirections.sort((dir1, dir2) => { - const nextMove1 = this.currentIndex + dir1; - const nextMove2 = this.currentIndex + dir2; - return distanceToPacman(nextMove1, pacmanIndex) - distanceToPacman(nextMove2, pacmanIndex); - }); - - // Return the closest direction if available - return validDirections.length > 0 ? validDirections[0] : null; - }; - - let direction = chooseDirection(); // Initial direction - - // Move the ghost at regular intervals - this.timerId = setInterval(() => { - // Logic for ghost movement - if (!gameOver && direction !== null) { - const nextMove = this.currentIndex + direction; // Calculate the next potential position for the ghost - - // Check if next move isn't a wall or another ghost - if (!grid[nextMove].classList.contains('wall') && !grid[nextMove].classList.contains('ghost')) { - // Remove ghost from the current position - grid[this.currentIndex].classList.remove('ghost', this.color); - // Move the ghost to the next position - this.currentIndex = nextMove; - // Place the ghost on the new position - grid[this.currentIndex].classList.add('ghost', this.color); - } else { - // Choose a new direction if the ghost can't move - direction = chooseDirection(); - } - - // Check if the ghost touched Pac-Man - if (this.currentIndex === pacmanCurrentIndex) { - gameOver = true; - endGame(false); // Pac-Man loses + // Initialize lives using a for loop + for (let lives = 3; lives > 0; lives--) { + } + + // Function to end the game + const endGame = () => { + clearInterval(gameLoop); // Stop the game loop + + // Stop ghost movements + ghost1.stop(); + ghost2.stop(); + + // Display game over message after a short delay + setTimeout(() => { + alert("Game over! You lost!"); + }, 500); + }; + + // Game loop + gameLoop = setInterval(movePacman, 200); // Move Pac-Man every 200ms + + // Ghost + class Ghost { + constructor(startIndex, color) { + // Initialize Ghost + this.currentIndex = startIndex; // Set the current index of the ghost + this.color = color; // Set the color of the ghost + this.timerId = null; // Timer ID for ghost movement interval + } + + moveGhost() { + const directions = [-1, +1, -cols, +cols]; // Possible directions for the ghost + + // Function to calculate distance between two indices on the grid + const distanceToPacman = (ghostIndex, pacmanIndex) => { + const ghostRow = Math.floor(ghostIndex / cols); + const ghostCol = ghostIndex % cols; + const pacmanRow = Math.floor(pacmanIndex / cols); + const pacmanCol = pacmanIndex % cols; + return Math.abs(ghostRow - pacmanRow) + Math.abs(ghostCol - pacmanCol); + }; + + // Function to choose the best direction towards Pac-Man + const chooseDirection = () => { + // Get Pac-Man's current index + const pacmanIndex = grid.findIndex(cell => cell.classList.contains('pacman')); + + // Calculate distances for each direction and filter out invalid moves + const validDirections = directions.filter(direction => { + const nextMove = this.currentIndex + direction; + return !grid[nextMove].classList.contains('wall') && !grid[nextMove].classList.contains('ghost'); + }); + + // Sort directions by distance to Pac-Man + validDirections.sort((dir1, dir2) => { + const nextMove1 = this.currentIndex + dir1; + const nextMove2 = this.currentIndex + dir2; + return distanceToPacman(nextMove1, pacmanIndex) - distanceToPacman(nextMove2, pacmanIndex); + }); + + // Return the closest direction if available + return validDirections.length > 0 ? validDirections[0] : null; + }; + + let direction = chooseDirection(); // Initial direction + + // Move the ghost at regular intervals + this.timerId = setInterval(() => { + // Logic for ghost movement + if (!gameOver && direction !== null) { + const nextMove = this.currentIndex + direction; // Calculate the next potential position for the ghost + + // Check if next move isn't a wall or another ghost + if (!grid[nextMove].classList.contains('wall') && !grid[nextMove].classList.contains('ghost')) { + // Remove ghost from the current position + grid[this.currentIndex].classList.remove('ghost', this.color); + // Move the ghost to the next position + this.currentIndex = nextMove; + // Place the ghost on the new position + grid[this.currentIndex].classList.add('ghost', this.color); + } else { + // Choose a new direction if the ghost can't move + direction = chooseDirection(); + } + + // Check if the ghost touched Pac-Man + if (this.currentIndex === pacmanCurrentIndex) { + lives--; // Decrease lives + document.getElementById('livesValue').textContent = lives; // Update lives display + + if (lives === 0) { + gameOver = true; + endGame(); // Game over + } else { + // Reset Pac-Man's position + grid[pacmanCurrentIndex].classList.remove('pacman'); + pacmanCurrentIndex = 21; + grid[pacmanCurrentIndex].classList.add('pacman'); + } + } } - } - }, 200); // Move Ghost every 200ms - } - - stop() { - clearInterval(this.timerId); // Stop the ghost movement + }, 200); // Move Ghost every 200ms + } + + stop() { + clearInterval(this.timerId); // Stop the ghost movement + } } - } - - // Create ghosts - const ghost1 = new Ghost(209, 'red'); // Place the first ghost - const ghost2 = new Ghost(229, 'blue'); // Place the second ghost + + // Create ghosts + const ghost1 = new Ghost(209, 'red'); // Place the first ghost + const ghost2 = new Ghost(229, 'blue'); // Place the second ghost + + // Start ghost movement + ghost1.moveGhost(); + ghost2.moveGhost(); + + // Define the lifeIcons array globally + const lifeIcons = [ + document.getElementById('life1'), + document.getElementById('life2'), + ]; + + const updateLivesDisplay = () => { + console.log('Updating lives display. Current lives:', lives); + for (let i = 0; i < lifeIcons.length; i++) { + if (i < lives) { + lifeIcons[i].style.display = 'inline'; // Display the life icon + } else { + lifeIcons[i].style.display = 'none'; // Hide the life icon + } + console.log(`Life icon ${i + 1}: display is ${lifeIcons[i].style.display}`); + } + }; + + const checkCollision = () => { + if (grid[pacmanCurrentIndex].classList.contains('ghost')) { + lives--; // Decrease lives + updateLivesDisplay(); // Update visual display of lives + + // Reset Pac-Man's position + grid[pacmanCurrentIndex].classList.remove('pacman'); + pacmanCurrentIndex = 21; + grid[pacmanCurrentIndex].classList.add('pacman'); + + // Update lives count in the HTML element + document.getElementById('livesValue').textContent = lives; + + // Check if there are no lives left + if (lives === 0) { + gameOver = true; + endGame(); // Game over + } + } + }; + + // Check for collision on Pac-Man movement + setInterval(checkCollision, 200); // Check collision every 200ms + }); - // Start ghost movement - ghost1.moveGhost(); - ghost2.moveGhost(); -}); \ No newline at end of file diff --git a/PacMan/style.css b/PacMan/style.css index 8d8db15d71..2c9c3bcd2a 100644 --- a/PacMan/style.css +++ b/PacMan/style.css @@ -89,3 +89,21 @@ body { .blue { --ghost-color: green; } + +/* CSS voor het weergeven van levens */ +#livesContainer { + margin-top: 20px; + font-size: 20px; + font-weight: bold; + color: white; +} + +.life { + display: inline-block; + width: 30px; + height: 30px; + background-color: yellow; + border: 2px solid white; + border-radius: 50%; + margin-right: 10px; +} From f8a85009f68b1ed0cb1ac1bfed3a4c5c498a1231 Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sat, 15 Jun 2024 23:18:18 +0200 Subject: [PATCH 08/22] Update Update nummers --- PacMan/jscrpt.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PacMan/jscrpt.js b/PacMan/jscrpt.js index a4c35a2e8a..bd126c87b8 100644 --- a/PacMan/jscrpt.js +++ b/PacMan/jscrpt.js @@ -7,7 +7,7 @@ document.addEventListener('DOMContentLoaded', () => { const rows = 20; // Number of rows in the grid const cols = 20; // Number of columns in the grid let score = 0; // Player's score - let lives = 3; // Player's lives + let lives = 2; // Player's lives let totalPacDots = 0; // Total number of pac-dots in the game let gameOver = false; // Flag to track game over state let gameLoop; // Variable to hold game loop interval @@ -155,7 +155,7 @@ document.addEventListener('DOMContentLoaded', () => { }); // Initialize lives using a for loop - for (let lives = 3; lives > 0; lives--) { + for (let lives = 2; lives > 0; lives--) { } // Function to end the game From e07e6e526da456a594f776d05f3e7818b6f6f516 Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sat, 15 Jun 2024 23:21:53 +0200 Subject: [PATCH 09/22] Update --- PacMan/jscrpt.js | 4 ++-- PacMan/style.css | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/PacMan/jscrpt.js b/PacMan/jscrpt.js index bd126c87b8..a4c35a2e8a 100644 --- a/PacMan/jscrpt.js +++ b/PacMan/jscrpt.js @@ -7,7 +7,7 @@ document.addEventListener('DOMContentLoaded', () => { const rows = 20; // Number of rows in the grid const cols = 20; // Number of columns in the grid let score = 0; // Player's score - let lives = 2; // Player's lives + let lives = 3; // Player's lives let totalPacDots = 0; // Total number of pac-dots in the game let gameOver = false; // Flag to track game over state let gameLoop; // Variable to hold game loop interval @@ -155,7 +155,7 @@ document.addEventListener('DOMContentLoaded', () => { }); // Initialize lives using a for loop - for (let lives = 2; lives > 0; lives--) { + for (let lives = 3; lives > 0; lives--) { } // Function to end the game diff --git a/PacMan/style.css b/PacMan/style.css index 2c9c3bcd2a..ffd4c27008 100644 --- a/PacMan/style.css +++ b/PacMan/style.css @@ -90,7 +90,7 @@ body { --ghost-color: green; } -/* CSS voor het weergeven van levens */ +/*Lives*/ #livesContainer { margin-top: 20px; font-size: 20px; From f8ad9f5ae72d23a3a2d9ab0a031f096bb9e6e166 Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sat, 15 Jun 2024 23:24:20 +0200 Subject: [PATCH 10/22] Fix amount of lives Amount of lives fixed --- PacMan/style.css | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/PacMan/style.css b/PacMan/style.css index ffd4c27008..6e562ce6c1 100644 --- a/PacMan/style.css +++ b/PacMan/style.css @@ -107,3 +107,8 @@ body { border-radius: 50%; margin-right: 10px; } + +/*Hide life*/ +.life.hidden { + display: none; +} From f56622aea2093ed2bf7534cb9ce261a14665d3e3 Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sat, 15 Jun 2024 23:41:40 +0200 Subject: [PATCH 11/22] Fix life icons -They appeared weird at first --- PacMan/jscrpt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PacMan/jscrpt.js b/PacMan/jscrpt.js index a4c35a2e8a..3526efb0b3 100644 --- a/PacMan/jscrpt.js +++ b/PacMan/jscrpt.js @@ -281,7 +281,7 @@ document.addEventListener('DOMContentLoaded', () => { console.log('Updating lives display. Current lives:', lives); for (let i = 0; i < lifeIcons.length; i++) { if (i < lives) { - lifeIcons[i].style.display = 'inline'; // Display the life icon + lifeIcons[i].style.display = 'inline-block'; // Display the life icon } else { lifeIcons[i].style.display = 'none'; // Hide the life icon } From af4485043fe5cd33f94a732a5aa423f3ea9359eb Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sat, 15 Jun 2024 23:56:07 +0200 Subject: [PATCH 12/22] Update timing --- PacMan/jscrpt.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PacMan/jscrpt.js b/PacMan/jscrpt.js index 3526efb0b3..d1641044d8 100644 --- a/PacMan/jscrpt.js +++ b/PacMan/jscrpt.js @@ -311,6 +311,6 @@ document.addEventListener('DOMContentLoaded', () => { }; // Check for collision on Pac-Man movement - setInterval(checkCollision, 200); // Check collision every 200ms + setInterval(checkCollision, 100); // Check collision every 100ms }); From 8efa00b6f6eae5c24ae04aaefaf373dd5a04e766 Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sun, 16 Jun 2024 00:09:15 +0200 Subject: [PATCH 13/22] Name changes -had to change names of files --- {PacMan => Pac_Man}/index.html | 2 +- PacMan/jscrpt.js => Pac_Man/script.js | 0 {PacMan => Pac_Man}/style.css | 0 3 files changed, 1 insertion(+), 1 deletion(-) rename {PacMan => Pac_Man}/index.html (94%) rename PacMan/jscrpt.js => Pac_Man/script.js (100%) rename {PacMan => Pac_Man}/style.css (100%) diff --git a/PacMan/index.html b/Pac_Man/index.html similarity index 94% rename from PacMan/index.html rename to Pac_Man/index.html index 2a7dd4a7fc..c435db18b0 100644 --- a/PacMan/index.html +++ b/Pac_Man/index.html @@ -22,7 +22,7 @@ - + diff --git a/PacMan/jscrpt.js b/Pac_Man/script.js similarity index 100% rename from PacMan/jscrpt.js rename to Pac_Man/script.js diff --git a/PacMan/style.css b/Pac_Man/style.css similarity index 100% rename from PacMan/style.css rename to Pac_Man/style.css From a62c809c122b55bd104ed68238ab0014c5b4b9d5 Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sun, 16 Jun 2024 00:11:14 +0200 Subject: [PATCH 14/22] Actual total score -Actual total score needed to win --- Pac_Man/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pac_Man/script.js b/Pac_Man/script.js index d1641044d8..25d4184bde 100644 --- a/Pac_Man/script.js +++ b/Pac_Man/script.js @@ -129,7 +129,7 @@ document.addEventListener('DOMContentLoaded', () => { // Function to check for win condition const checkForWin = () => { - if (score === 300) { // Total score won + if (score === 2030) { // Total score won gameOver = true; // Set game over flag clearInterval(gameLoop); // Stop the game loop From 2824db3c0346ebf58fbd80c6f593607672b16e01 Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sun, 16 Jun 2024 00:23:29 +0200 Subject: [PATCH 15/22] README Added README --- Pac_Man/Img/Screenshot.png | Bin 0 -> 25980 bytes Pac_Man/README.md | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 Pac_Man/Img/Screenshot.png create mode 100644 Pac_Man/README.md diff --git a/Pac_Man/Img/Screenshot.png b/Pac_Man/Img/Screenshot.png new file mode 100644 index 0000000000000000000000000000000000000000..2fb1a59e204d6ef2f316bc6dd8a0daff44b7a01d GIT binary patch literal 25980 zcmeHv3tWFTm&Yyn#<;MsF;?s3&S8YKc#+^nW#=3m;A$VpPYkeO0XH3`@=N}MR)zkRk zm%jyk@A5qYagS`K{c#-l{qG0X?g&F5COn4!A5(_CwHJZ#o49V(_uCHnh&Tt&+~5(A z3f#EsEx+S`={+&_A8W@@DyLk$^1|sm|1Zb<{i_c@n7m~6ca7hC^|1x{$&)n?8;)$O z_-=j0!OxeE+qHhe*UM*d4)O*vj@}+g|2RHshV{_zH((W&p zj>Gpn|M5tkBwJ&Hi&RbH5qNoa5(ind)5CZNnb;wl3(@TG633)OPI`KJ$OmA|i0`ho z)DZs$Kf1bU%IPuigO3BQO*K4m;QzoAd8`{w`A=hQ&&{5mzEUku!<-@7s!O^ouJ=F4 zc7+g#pLw5`z+V}0JbTk8@V}dun*IML-Z>xnnRDciR>O0JSl>Qk_OOnzi%Vl~tjxJA zfm+fFCG>Rl2GZ^H>g0@cr1nv|S|>p_=&VRv+^NM|+!=a}yS!$DyWET6?#@J$?oLM_ zmOS=P=8i>JA3Of)PSw)bVqQwRx}0(+ogCf1dvkuqgSFB8E$)zj>cQ%$5UoKVwtK;w zwe#Mlq?{J3^O7h}cY_?1bbr_VTig9Z*((4%?qaHOYSefo9+?)7qAS-4{`axAo`H|9BN4P&b50hoxw_4)}L&ZRC}IoQ45C?ES6N)@M?(#Y?On#x!jov%J_e-3}iHm;-^DkAuy*>QLJKW;PkGw2B$=Tt%A@d_q~d4KpYz^IZphSe=EY>zs9 z^5n@+u5_3F7UvLax!f6|%QO8~`ag=ib;BteQu{AYUZSk^ZbIYG6{m^!x-4RbTyP5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H)?m1OWLZ+AV*0^^?nl@$SkXT`kH{ zBa%>xDE8~J0_yMR`urKkkD59b>?(FXIA(xOIQ*o8@YfQOiZpUSYrA^L%cbVDtem^@N&k!-IUq+S zq_``v)Mf{bq@RJ01(B=EcScTWrr6apx=s^+{wLG~Fm`{xrmk%FAo&sZS z47NcFgP}rYzr`}I6&YRi+5qVy$16YFZXhxY5`Yvo!#C8?q8xOldGj%YdRhp78{t?I zu3P&3=f8=RY2@$>%}vxGB0wM>%lTghNaBqLQzdYVK#In9KC0gN$La;9BseKX`tI-eH_7+6>IZ_uNyuEd0DAJUbYV#vznP;?y? z%_M`M7KzyO!H7;Oe|_hq=~L~QTvOAYV-7MP!kS9n>3S1xb~~6OM3WdfLc<&KB@S(C zk@oh!iUW+F|N1T7*_sh#>wAdb4!){O4A_cnmZ|w}{vq zsXt>$*PF%~0Nu-iQ-)6>!eKlVM1fJjIV@AsvyF*m#Xy^2xYZu)feo$pj71u_S>D0- z3KF*W!hS(HP|GoNxP}9er6%R-+d8mX&+D%Tam(9@up45AnB3AHxNL$(j;8LO4=5v! zCE__EfOGf_^k#8LFnxphMsEaYB*`1ayte)lj*XXS+&QD}bK@v-$>{!?iXcKnz7zwebl-=ckBgC09z!EE{KAy}J~;io%HidN zg~)^Y;egoCX|$5vsNg9TNbpSZ`1Pi}0^%oA6>rO+l|C@g0qt`{TPM>T)|P$&s+~sq z?O)Z=*dPlwa3L-{h5O!vpEqqCTB2qK^*0cCQ# Date: Sun, 16 Jun 2024 00:25:02 +0200 Subject: [PATCH 16/22] Update README.md --- Pac_Man/README.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/Pac_Man/README.md b/Pac_Man/README.md index 8bfdae4119..3a0c2f4884 100644 --- a/Pac_Man/README.md +++ b/Pac_Man/README.md @@ -1,7 +1,3 @@ -Sure, here's a README for your Pac-Man game using the provided template: - ---- - # Pac-Man ## Description 📃 @@ -28,7 +24,7 @@ This is a classic Pac-Man game built using HTML, CSS, and JavaScript. The object 6. **Win the Game**: Collect all pac-dots to win the game. A message will display "Congratulations! You won!". ## Screenshots 📸 -![Pac-Man Game Screenshot](path-to-screenshot.png) +![Img/Screenshot.png](img/screenshot.png) ## Working Video 📹 [Link to video demonstration](path-to-video.mp4) \ No newline at end of file From 20b61cd7158bc8f8e08c8c190b287ec8b5aa6ac5 Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sun, 16 Jun 2024 00:37:33 +0200 Subject: [PATCH 17/22] Update README --- Pac_Man/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pac_Man/README.md b/Pac_Man/README.md index 3a0c2f4884..c9c55bdd1e 100644 --- a/Pac_Man/README.md +++ b/Pac_Man/README.md @@ -27,4 +27,4 @@ This is a classic Pac-Man game built using HTML, CSS, and JavaScript. The object ![Img/Screenshot.png](img/screenshot.png) ## Working Video 📹 -[Link to video demonstration](path-to-video.mp4) \ No newline at end of file +https://drive.google.com/file/d/1MWgfO_Zyn9sKfSN3k9mc2Jf1HUaGX6ZJ/view?usp=sharing \ No newline at end of file From 00cd06892d40339a2da916bc82416b0504b3bb64 Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sun, 16 Jun 2024 09:27:41 +0200 Subject: [PATCH 18/22] Aanpassing map Aanpassing map screenshot --- Pac_Man/{Img => assets/images}/Screenshot.png | Bin 1 file changed, 0 insertions(+), 0 deletions(-) rename Pac_Man/{Img => assets/images}/Screenshot.png (100%) diff --git a/Pac_Man/Img/Screenshot.png b/Pac_Man/assets/images/Screenshot.png similarity index 100% rename from Pac_Man/Img/Screenshot.png rename to Pac_Man/assets/images/Screenshot.png From d520bb2a4cc7fb0f0d54deafc22f86c893f8c01f Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sun, 16 Jun 2024 09:37:23 +0200 Subject: [PATCH 19/22] Video removed -Video doesnt't add much and it's not required --- Pac_Man/README.md | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/Pac_Man/README.md b/Pac_Man/README.md index c9c55bdd1e..0aee32b45c 100644 --- a/Pac_Man/README.md +++ b/Pac_Man/README.md @@ -24,7 +24,4 @@ This is a classic Pac-Man game built using HTML, CSS, and JavaScript. The object 6. **Win the Game**: Collect all pac-dots to win the game. A message will display "Congratulations! You won!". ## Screenshots 📸 -![Img/Screenshot.png](img/screenshot.png) - -## Working Video 📹 -https://drive.google.com/file/d/1MWgfO_Zyn9sKfSN3k9mc2Jf1HUaGX6ZJ/view?usp=sharing \ No newline at end of file +![assets/images/Screenshot.png](assets/images/Screenshot.png) From 3914b813e086d8dad505bf9625888ec8dec998f8 Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sun, 16 Jun 2024 09:45:09 +0200 Subject: [PATCH 20/22] Folder name change --- Pac_Man/{assets/images => Img}/Screenshot.png | Bin assets/images/Pac_Man_Thumbnail.png | Bin 0 -> 25980 bytes 2 files changed, 0 insertions(+), 0 deletions(-) rename Pac_Man/{assets/images => Img}/Screenshot.png (100%) create mode 100644 assets/images/Pac_Man_Thumbnail.png diff --git a/Pac_Man/assets/images/Screenshot.png b/Pac_Man/Img/Screenshot.png similarity index 100% rename from Pac_Man/assets/images/Screenshot.png rename to Pac_Man/Img/Screenshot.png diff --git a/assets/images/Pac_Man_Thumbnail.png b/assets/images/Pac_Man_Thumbnail.png new file mode 100644 index 0000000000000000000000000000000000000000..2fb1a59e204d6ef2f316bc6dd8a0daff44b7a01d GIT binary patch literal 25980 zcmeHv3tWFTm&Yyn#<;MsF;?s3&S8YKc#+^nW#=3m;A$VpPYkeO0XH3`@=N}MR)zkRk zm%jyk@A5qYagS`K{c#-l{qG0X?g&F5COn4!A5(_CwHJZ#o49V(_uCHnh&Tt&+~5(A z3f#EsEx+S`={+&_A8W@@DyLk$^1|sm|1Zb<{i_c@n7m~6ca7hC^|1x{$&)n?8;)$O z_-=j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Adb4!){O4A_cnmZ|w}{vq zsXt>$*PF%~0Nu-iQ-)6>!eKlVM1fJjIV@AsvyF*m#Xy^2xYZu)feo$pj71u_S>D0- z3KF*W!hS(HP|GoNxP}9er6%R-+d8mX&+D%Tam(9@up45AnB3AHxNL$(j;8LO4=5v! zCE__EfOGf_^k#8LFnxphMsEaYB*`1ayte)lj*XXS+&QD}bK@v-$>{!?iXcKnz7zwebl-=ckBgC09z!EE{KAy}J~;io%HidN zg~)^Y;egoCX|$5vsNg9TNbpSZ`1Pi}0^%oA6>rO+l|C@g0qt`{TPM>T)|P$&s+~sq z?O)Z=*dPlwa3L-{h5O!vpEqqCTB2qK^*0cCQ# Date: Sun, 16 Jun 2024 09:53:21 +0200 Subject: [PATCH 21/22] Moved maps -Moved game to the right map --- {Pac_Man => Games/Pac_Man_Game}/Img/Screenshot.png | Bin {Pac_Man => Games/Pac_Man_Game}/README.md | 2 +- {Pac_Man => Games/Pac_Man_Game}/index.html | 0 {Pac_Man => Games/Pac_Man_Game}/script.js | 0 {Pac_Man => Games/Pac_Man_Game}/style.css | 0 README.md | 2 +- 6 files changed, 2 insertions(+), 2 deletions(-) rename {Pac_Man => Games/Pac_Man_Game}/Img/Screenshot.png (100%) rename {Pac_Man => Games/Pac_Man_Game}/README.md (96%) rename {Pac_Man => Games/Pac_Man_Game}/index.html (100%) rename {Pac_Man => Games/Pac_Man_Game}/script.js (100%) rename {Pac_Man => Games/Pac_Man_Game}/style.css (100%) diff --git a/Pac_Man/Img/Screenshot.png b/Games/Pac_Man_Game/Img/Screenshot.png similarity index 100% rename from Pac_Man/Img/Screenshot.png rename to Games/Pac_Man_Game/Img/Screenshot.png diff --git a/Pac_Man/README.md b/Games/Pac_Man_Game/README.md similarity index 96% rename from Pac_Man/README.md rename to Games/Pac_Man_Game/README.md index 0aee32b45c..9a50d70455 100644 --- a/Pac_Man/README.md +++ b/Games/Pac_Man_Game/README.md @@ -24,4 +24,4 @@ This is a classic Pac-Man game built using HTML, CSS, and JavaScript. The object 6. **Win the Game**: Collect all pac-dots to win the game. A message will display "Congratulations! You won!". ## Screenshots 📸 -![assets/images/Screenshot.png](assets/images/Screenshot.png) +![Img/Screenshot.png](Img/Screenshot.png) diff --git a/Pac_Man/index.html b/Games/Pac_Man_Game/index.html similarity index 100% rename from Pac_Man/index.html rename to Games/Pac_Man_Game/index.html diff --git a/Pac_Man/script.js b/Games/Pac_Man_Game/script.js similarity index 100% rename from Pac_Man/script.js rename to Games/Pac_Man_Game/script.js diff --git a/Pac_Man/style.css b/Games/Pac_Man_Game/style.css similarity index 100% rename from Pac_Man/style.css rename to Games/Pac_Man_Game/style.css diff --git a/README.md b/README.md index a2501fa3fc..41e0f82d77 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ This repository also provides one such platforms where contributers come over an | Game | Game | Game | Game | Game | -| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | +| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | [Pac_Man]() | [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) | From 772df1c47230ea3f1282012439ddfd372084dfb2 Mon Sep 17 00:00:00 2001 From: aamira0 <150680980+aamira0@users.noreply.github.com> Date: Sun, 16 Jun 2024 09:57:54 +0200 Subject: [PATCH 22/22] Added link Added link to main README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 41e0f82d77..446f537cf8 100644 --- a/README.md +++ b/README.md @@ -108,7 +108,7 @@ This repository also provides one such platforms where contributers come over an | Game | Game | Game | Game | Game | -| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | [Pac_Man]() +| ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------- | [Pac_Man_Game](https://github.com/aamira0/GameZone/tree/main/Games/Pac_Man_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) |