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

fix: pac-man doesnt run in the first line #19

Merged
merged 4 commits into from
Nov 19, 2023

Conversation

horw
Copy link
Contributor

@horw horw commented Nov 1, 2023

This PR addresses an issue related to the initial execution of scripts in small terminal windows.
If there isn't enough vertical space for the full Pac-Man animation, we set diff_y to 0.

@horw
Copy link
Contributor Author

horw commented Nov 1, 2023

Also found another bug with width, actually it is 29,but your width shows as ~88, you can check it

screenshot after fixing:
image

Copy link
Contributor Author

@horw horw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fmt.Printf("\033[%d;%dH%s", y+k+1, x, strings.Repeat(" ", width))

What do you think about this width? When it is equal to Pac-Man's size, it doesn't look very smooth, but if you add just 3-5 symbols, it looks much better.

@orangekame3
Copy link
Owner

orangekame3 commented Nov 1, 2023

Thank you for your contribution! 🎉

I'll check it this weekend.

Signed-off-by: orangekame3 <miya.org.0309@gmail.com>
@orangekame3
Copy link
Owner

@horw
Thank you for PR!
#19 (review)
this comment is also LGTM, I add 3 more symbol.

Signed-off-by: orangekame3 <miya.org.0309@gmail.com>
@orangekame3 orangekame3 merged commit e96286f into orangekame3:main Nov 19, 2023
1 check passed
@orangekame3 orangekame3 mentioned this pull request Nov 19, 2023
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.

None yet

2 participants