Skip to content

Fix 2048 high score file path handling - #254

Merged
steam-bell-92 merged 1 commit into
steam-bell-92:mainfrom
Kunal241207:fix/2048-high-score-path
May 16, 2026
Merged

Fix 2048 high score file path handling#254
steam-bell-92 merged 1 commit into
steam-bell-92:mainfrom
Kunal241207:fix/2048-high-score-path

Conversation

@Kunal241207

Copy link
Copy Markdown
Contributor

Closes #253

Summary

This PR makes the 2048 game’s high score handling more reliable and portable.

The score file is now resolved relative to the script location instead of the current working directory, which prevents the game from reading or writing the wrong file when launched from another path. It also handles empty or invalid score contents safely by falling back to 0 rather than crashing on startup.

Validation was completed on the updated file, and no syntax errors were found.

@vercel

vercel Bot commented May 16, 2026

Copy link
Copy Markdown

@Kunal241207 is attempting to deploy a commit to the Anuj's projects Team on Vercel.

A member of the Team first needs to authorize it.

@steam-bell-92 steam-bell-92 added type:bug Something isn't working level:beginner gssoc:approved GSSoC 2026 approving tag labels May 16, 2026
@steam-bell-92
steam-bell-92 merged commit b104bcd into steam-bell-92:main May 16, 2026
3 of 4 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🎉 Thank you for your contribution!

Your Pull Request has been merged successfully.

We appreciate the time and effort you put into improving this project. Contributions like yours help the repository grow and stay useful for everyone.

If you'd like to contribute again, please check the open issues and make sure you are assigned before opening another Pull Request.

Thanks again for your support! 🙌

@github-actions

Copy link
Copy Markdown
Contributor

Thanks @Kunal241207! I've added you to the contributors list.

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

Labels

gssoc:approved GSSoC 2026 approving tag level:beginner type:bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2048 high score file should use a script-relative path and ignore invalid data

2 participants