This is a classic Pac-Man game built using HTML, CSS, and JavaScript. The objective of the game is to navigate Pac-Man through a maze, eat all the pac-dots, avoid the ghosts, and try to win the game!
- Pac-Man Movement: Use arrow keys to move Pac-Man up, down, left, or right.
- Pac-Dots: Eat pac-dots to increase your score.
- Ghosts: Avoid ghosts that move around the maze. If a ghost touches Pac-Man, a life is lost.
- Lives: The player starts with 2 lives. The game ends when all lives are lost.
- Winning Condition: Collect all pac-dots to win the game.
- Game Over: The game ends when Pac-Man loses all lives and gets caught.
- Start the Game: Open the game in your web browser. Pac-Man starts at the initial position in the maze.
- Move Pac-Man: Use the arrow keys on your keyboard to move Pac-Man.
- Arrow Up: Move up
- Arrow Down: Move down
- Arrow Left: Move left
- Arrow Right: Move right
- Collect Pac-Dots: Navigate through the maze and collect all the pac-dots to increase your score.
- Avoid Ghosts: Avoid the ghosts moving around the maze. If a ghost touches Pac-Man, a life is lost.
- Game Over: The game ends when Pac-Man loses all lives. A message will display "Game over! You lost!".
- Win the Game: Collect all pac-dots to win the game. A message will display "Congratulations! You won!".