Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Interactive Tower of Hanoi Game #1005

Merged
merged 2 commits into from
Nov 3, 2024
Merged

Conversation

Kritika75
Copy link
Contributor

@Kritika75 Kritika75 commented Nov 2, 2024

Pull Request for PyVerse 💡

Requesting to submit a pull request to the PyVerse repository.


Issue Title

Addition of Tower of Hanoi Game #991

  • I have provided the issue title.

Info about the Related Issue

The goal of this project is to develop an interactive and visually engaging Tower of Hanoi game using Python. By leveraging Pygame for graphics and Colorama for console feedback, this game provides an immersive learning experience for users to understand the classic Tower of Hanoi puzzle. It aims to help players practice logical problem-solving while enjoying a vibrant interface, customizable features, and easy-to-follow gameplay instructions.

  • I have described the aim of the project.

Name

Kritika Singh

  • I have provided my name.

GitHub ID

Kritika75

  • I have provided my GitHub ID.

Email ID

kritikasingh37918@gmail.com

  • I have provided my email ID.

Identify Yourself

Gssoc'24 ext

  • I have mentioned my participant role.

Closes

issue no. #991

  • I have provided the issue number.

Describe the Add-ons or Changes You've Made

I added a fully interactive Tower of Hanoi game using Pygame for the graphical interface and Colorama for colorful console feedback. Key features include:

  1. Visual representation of rods and disks with customizable colors.
  2. Click-and-drag functionality for moving disks between rods.
  3. Console instructions and alerts for invalid moves, enhancing user guidance.
  4. Adjustable settings for difficulty by changing the number of disks.
  5. These changes aim to create an educational and user-friendly experience with visually appealing elements.
  • I have described my changes.

Type of Change

Select the type of change:

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

The game has been tested manually to ensure smooth gameplay and adherence to the Tower of Hanoi rules:

  1. Basic Functionality: Verified that disks can be clicked, moved, and placed on different rods correctly.
  2. Rule Validation: Checked that the game prevents larger disks from being placed on smaller ones, displaying an error message in the console.
  3. Visuals and Console Feedback: Ensured colors and instructions display correctly on the screen and console.
  4. Edge Cases: Tested the start and end of the game, including the goal of moving all disks to the third rod.
  5. This testing confirmed that the game runs smoothly without errors and meets functionality requirements.

game1
game2

  • I have described my testing process.

Checklist

Please confirm the following:

  • My code follows the guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly wherever it was hard to understand.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added things that prove my fix is effective or that my feature works.
  • Any dependent changes have been merged and published in downstream modules.

@UTSAVS26

Copy link

github-actions bot commented Nov 2, 2024

👋 Thank you for opening this pull request! We're excited to review your contribution. Please give us a moment, and we'll get back to you shortly!

Feel free to join our community on Discord to discuss more!

@UTSAVS26 UTSAVS26 added Contributor Denotes issues or PRs submitted by contributors to acknowledge their participation. Status: Review Ongoing 🔄 PR is currently under review and awaiting feedback from reviewers. level1 gssoc-ext labels Nov 2, 2024
@UTSAVS26 UTSAVS26 merged commit af23e2e into UTSAVS26:main Nov 3, 2024
1 check passed
@UTSAVS26 UTSAVS26 added Status: Approved ✔️ PRs that have passed review and are approved for merging. and removed Status: Review Ongoing 🔄 PR is currently under review and awaiting feedback from reviewers. labels Nov 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Contributor Denotes issues or PRs submitted by contributors to acknowledge their participation. gssoc-ext level1 Status: Approved ✔️ PRs that have passed review and are approved for merging.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants