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

hangman.rb doesn't randomize the order of puzzle words #730

Closed
BrBill opened this issue Apr 28, 2022 · 9 comments
Closed

hangman.rb doesn't randomize the order of puzzle words #730

BrBill opened this issue Apr 28, 2022 · 9 comments

Comments

@BrBill
Copy link
Contributor

BrBill commented Apr 28, 2022

The game in BASIC chooses a random order for the words that are selected for each hangman round. In this ruby implementation, the array of available words is just offered to the player in the order they appear in the source.

@BrBill
Copy link
Contributor Author

BrBill commented Apr 28, 2022

I can see in the source that it shuffles the words to a new array, but the shuffled array isn't used. The WORDS array is still used instead. I'm working on this fix.

@BrBill
Copy link
Contributor Author

BrBill commented Apr 28, 2022

How can I push my fix branch? Do I need to request collaborator status somehow?

ERROR: Permission to coding-horror/basic-computer-games.git denied to BrBill.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

I can clone and pull to my heart's delight, so clearly I can read from the remote repo. Something is weird.

@jnellis
Copy link
Contributor

jnellis commented Apr 29, 2022

Hi Bill, the common flow is to fork this repository to your account. Then you clone your fork to your local development environment (pc, laptop). You make changes and commits on your local environment then push those back up to your github fork of this repository. Then from github you can easily submit a pull request to merge changes in your fork to this main repository and then when someone reviews it it will be merged or rejected with comment.

@BrBill
Copy link
Contributor Author

BrBill commented Apr 29, 2022

Thanks, @jnellis. I've never had to fork before, so here's to a new thing for me to learn.

@coding-horror
Copy link
Owner

Thanks for noticing this and giving it a fix, BrBill!

@BrBill
Copy link
Contributor Author

BrBill commented May 4, 2022

All right, got it forked, and made a pull request from my own repo.

@AnthonyMichaelTDM
Copy link
Contributor

can this issue be marked as resolved?

@BrBill
Copy link
Contributor Author

BrBill commented Sep 22, 2022

Done!

@BrBill
Copy link
Contributor Author

BrBill commented Jan 5, 2023

Why is it still open? I closed it. Ugh.

@BrBill BrBill closed this as completed Jan 5, 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

No branches or pull requests

4 participants