memory-game icon indicating copy to clipboard operation
memory-game copied to clipboard

Updated app.js

Open MirAafaq opened this issue 11 months ago • 0 comments

1.Added Player Turn and Match Tracking: Introduced variables playerTurn to keep track of which player's turn it is and matches to record the number of matches each player has made.

2.Updated Match Logic: Adjusted the logic in the checkForMatch function to handle the new multiplayer functionality. When a match is found, it updates the respective player's match count and displays it on the screen.

3.Updated Display: Changed the result display to show the match count for both players.

4.Determined Winner: Added logic to determine the winner based on the number of matches each player has made when the game is over.

5.Alternate Turns: Implemented logic to alternate between player turns after each match attempt.

MirAafaq avatar Mar 13 '24 12:03 MirAafaq