shrawani21 / gamer_21

Dots & Boxes
MIT License
55 stars 116 forks source link

Added Game replay and Quit buttons to Pygame Dots & Boxes - Issue Number 105 #106

Open Vivekkaspa opened 1 month ago

Vivekkaspa commented 1 month ago

Description

This repository contains a Pygame Dots & Boxes game that has been enhanced with replay and quit buttons. These buttons provide users with additional functionality to start a new game or exit the current game. This removes the extra usage of keyboard by players and thus allows to just click on the respective buttons instead of pressing the keys R and Q.

Changes Made : Fixes #105

  1. Replay Button: Added a replay button below the game over message. This button allows users to start a new game after the current game ends. The replay button is displayed with the text "Replay" and has a blue color.

  2. Quit Button: Added a quit button below the replay button. This button allows users to exit the game when clicked. The quit button is displayed with the text "Quit" and has a red color.

  3. Changing Grid size: Changed the grid size to 400X400 i.e SCREEN_WIDTH & SCREEN_HEIGHT to 400 each respectively to ensure proper spacing and padding upon addition of 2 buttons.

Implementation Details

Testing

Note

Screenshot (2641)

Vivekkaspa commented 4 weeks ago

@shrawani21 please review it and merge the above PR. Thank you! Also add the labels of gssoc and the level to this PR and in the issue. I have been asking for that since I opened issue. Pls try to review the PR and the corresponding issue that got resolved. Thank you :)