basic-computer-games icon indicating copy to clipboard operation
basic-computer-games copied to clipboard

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

Open BrBill opened this issue 3 years ago • 8 comments
trafficstars

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 avatar Apr 28 '22 20:04 BrBill

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 avatar Apr 28 '22 20:04 BrBill

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.

BrBill avatar Apr 28 '22 22:04 BrBill

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.

jnellis avatar Apr 29 '22 03:04 jnellis

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

BrBill avatar Apr 29 '22 19:04 BrBill

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

coding-horror avatar Apr 30 '22 18:04 coding-horror

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

BrBill avatar May 04 '22 01:05 BrBill

can this issue be marked as resolved?

AnthonyMichaelTDM avatar Sep 22 '22 22:09 AnthonyMichaelTDM

Done!

BrBill avatar Sep 22 '22 23:09 BrBill

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

BrBill avatar Jan 05 '23 01:01 BrBill