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

Color pairs are overfilled #3

Closed
jjszaniszlo opened this issue Jan 29, 2024 · 4 comments · Fixed by #4
Closed

Color pairs are overfilled #3

jjszaniszlo opened this issue Jan 29, 2024 · 4 comments · Fixed by #4

Comments

@jjszaniszlo
Copy link
Contributor

It seems that on my terminal emulator, I'm getting this error when trying to run the game using python 3.11.2 on MacOS. It seems that the loop overfills the pairs array. I'm not a python dev so I don't know much about the language or curses, so I'm not sure if the loop should go from 0-255 including 255. The error says greater than 255, so it's possible that it's looping from 0-256 unintentionally.

Screenshot 2024-01-29 at 2 37 34 PM
@jjszaniszlo
Copy link
Contributor Author

Screenshot 2024-01-29 at 3 29 15 PM

it seems that curses.COLORS is defined depending on the platform and terminal itself, so I'm not quite sure what could cause it to overflow besides an error with the range :/

@Vaiterius
Copy link
Owner

Thanks for bringing this up. Honestly, with MacOS users I have no idea about their situation, but one other person using Linux worked fine with them as far as I know. I could look more into support for different terminals. Does your #4 make the game run for you?

@jjszaniszlo
Copy link
Contributor Author

yep, #4 made it work. It might be some weird platform code down the line somewhere. curses is natively supported on all unix systems, so it definitely should have theoretically worked right out of the box.

@Vaiterius
Copy link
Owner

Ran it with no apparent issues on my end, I approve 👍

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 a pull request may close this issue.

2 participants