Summary:
This pull request includes a minor fix to handle kernel errors more gracefully when executing the code from notebooks.
Changes Made:
Modified the event handling to ensure Pygame quits properly and exits the program when the window is closed. This change addresses potential issues related to improper shutdowns when running the simulation from notebook environments.
Motivation:
The purpose of this change is to enhance the stability and resource management of the Tower of Hanoi simulation by ensuring that Pygame and the program exit cleanly upon window closure, which is particularly important in notebook environments.
Expected Impact:
Improves the handling of Pygame window closure.
Prevents potential kernel errors or hangs associated with improper shutdowns in notebook environments.
Pull Request Description
Summary: This pull request includes a minor fix to handle kernel errors more gracefully when executing the code from notebooks.
Changes Made:
Motivation: The purpose of this change is to enhance the stability and resource management of the Tower of Hanoi simulation by ensuring that Pygame and the program exit cleanly upon window closure, which is particularly important in notebook environments.
Expected Impact: