/falling-Emoji-Game

Primary LanguageJavaScriptGNU General Public License v3.0GPL-3.0

Falling Emoji Game

Introduction

Welcome to the Falling Emoji Game, a fun and challenging game where you need to match falling emojis to make them disappear. This game was supervised by Eng:Eman Fathi as part of Intake44.

Table of Contents

Description

The Falling Emoji Game is designed with a home page where the player can enter their name and start the game. The game includes a timer, falling emojis, and various levels of difficulty.

Folder Structure

  • styles/: Contains the CSS files.
  • script/: Contains the JavaScript files.
  • images/: Stores the game images.
  • audio/ :Stores the sound Effects and music
  • homePage.html: Home page.
  • gamePage.html: Game page.

Documentation

The code is thoroughly documented to ensure readability and maintainability. Each module and function has comments explaining its purpose and usage.

Object-Oriented Approach

The code follows an object-oriented approach to enhance modularity and reusability. Objects and classes are used to represent different components of the game.

Game Rules

  • The game starts when the user clicks the start button.
  • A timer of 2 minutes begins counting down.
  • Emojis fall randomly, and the player must match 4 horizontally or vertically to make them disappear.
  • The game ends when the time runs out or the emojis fill the entire box.
  • Player wins by making 10 matches before the timer expires.

Dialog Libraries

Dialog libraries are utilized for displaying messages. Built-in prompts and alerts are not used to provide a better user experience.

Local Storage

Local storage is employed to remember the user's name and display their last score if they have played before.

How to Play

  1. Open the game folder in your vsCode editior to access and select to run the homePage.html page with you live server to acess to the home page.
  2. Enter your name and click the play button.
  3. On the game page, click the start button to begin the game.
  4. Match emojis horizontally or vertically to score points.
  5. Win by making 10 matches before the timer runs out.
  6. Dialogs will inform you of your victory or defeat.