Skip to content

Conversation

@BhushanVidhate-27
Copy link

This PR improves game logic and UI by introducing:

  • Enhanced Game Over Detection:
  1. Checks both empty tiles and possible merges.
  2. Shows a popup when no moves are possible.
  • Move Tracking:
  1. All slide functions now return a moved flag.
  2. Tiles only move if there’s a valid change, preventing unnecessary new tiles.
  • Restart Functionality:
  1. Resets the board, score, and messages.
  2. Hides the game over popup and creates new initial tiles.
  • UI/UX Improvements:
  1. Styled game over popup with semi-transparent background.
  2. Smooth hover effects on retry button.
  3. Proper spacing and alignment consistent with the game's theme.
  • Impact:
  1. Ensures accurate game state tracking.
  2. Adds a more polished game over experience.
  3. Prevents invalid moves from affecting the game state.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant