Releases: TheAkshantSaini/Memory-Game
Releases · TheAkshantSaini/Memory-Game
Memory-Game-V1.1
Update - Memory Game Web App - 17-07-2023
Play Game Here - Play Now! Or Here!
HTML Changes:
- Added a
<link>
tag to include a favicon for the web app. - Added
<meta>
tags for the description and keywords to improve SEO. - Added a credits section at the bottom to display the names of Pralin Khaira and Akshant Saini.
CSS Changes:
- Updated the styling for the game container using flexbox to center it vertically and horizontally.
- Used CSS variables for primary, secondary, tertiary, and background colors for easier customization.
- Added media queries for responsive design.
- Updated the font-family declaration to include fallback fonts for better compatibility.
JavaScript Changes:
- Wrapped the code in an IIFE (Immediately Invoked Function Expression) to encapsulate the code and avoid polluting the global namespace.
- Updated the
generateGame
function to generate the cards HTML using a separate functiongenerateCardsHTML
for better code organization. - Added a timer that counts the time taken to complete the game and displays it in the UI.
- Added a move counter that keeps track of the total number of moves made to complete the game and displays it in the UI.
- Modified the
startGame
function to check if the game has already started before starting a new game. - Added the
abortGame
function to reset the game state and board when the "Abort" button is clicked. - Modified the
attachEventListeners
function to listen for the "abort" button click event. - Modified the
attachEventListeners
function to call theupdatePlayerInput
function when the "start" button is clicked.
Overall Improvements:
- Organized the code by separating HTML, CSS, and JavaScript into separate files.
- Added appropriate comments to enhance code readability and maintainability.
- Added a favicon, meta tags, and credits to improve the web app's SEO and user experience.
- Made the game UI more responsive by using media queries.
- Used CSS variables for easier customization of colors.
- Encapsulated JavaScript code within an IIFE to avoid global namespace pollution.
- Refactored the code by breaking down the
generateGame
function into smaller, reusable functions. - Updated the font-family declaration in CSS to include fallback fonts.
- Updated the timer and move counter in the JavaScript code to display the elapsed time and move count in the UI.
Contributors:
- Pralin Khaira
- Akshant Saini