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

Updated some structure of the 2048 game #5

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

RustambekSh
Copy link
Contributor

@RustambekSh RustambekSh commented Feb 8, 2025

Added constantss for grid size/styling, split gui setup into clear methods, and used descriptive names to make the code structure more intuitive. Reduced object creation and grid copies using list comprehensions and a cell factory method, cutting unnecessary memory usage. Separated game logic, centralized state checks, and streamlined movement code to simplify updates and debugging.

Have changed the structure and readibility.
Made it more memory efficient and maintainable.
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