Skip to content

Comments

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

Merged
orangekame3 merged 4 commits intoorangekame3:mainfrom
horw:fix/packman_first_line_run
Nov 19, 2023
Merged

fix: pac-man doesnt run in the first line#19
orangekame3 merged 4 commits intoorangekame3:mainfrom
horw:fix/packman_first_line_run

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 horw requested a review from orangekame3 as a code owner November 1, 2023 15:21
@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 <[email protected]>
@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 <[email protected]>
@orangekame3 orangekame3 merged commit e96286f into orangekame3:main Nov 19, 2023
@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.

2 participants