steaksauceyum wrote:
Greenatic wrote:
steaksauceyum wrote:
This is a bit confusing haha. I'll give it a go now. If you could produce code using the one I sent you with the one you created, that would be appreciated too! I just want to see how to mix them together. Text is harder to visualize hahaGkc's script seems to work pretty well. You just need to add in the part that prevents the total number of possible words from going to 0, as well as what to do if it hits 1.
Yeah I took a look at his. But it seems as though that the game never chooses another word. It changes over and over again after the first guess and goes on and on. Why does it do that?
It has 1799 words. Put it in turbo mode.
Offline
Greenatic wrote:
steaksauceyum wrote:
Greenatic wrote:
Gkc's script seems to work pretty well. You just need to add in the part that prevents the total number of possible words from going to 0, as well as what to do if it hits 1.Yeah I took a look at his. But it seems as though that the game never chooses another word. It changes over and over again after the first guess and goes on and on. Why does it do that?
It has 1799 words. Put it in turbo mode.
Ok I'm new to this haha, is there really a turbo mode?
Also, I designed my game (without the cheating algorithm) to ask for the length of the word you want to play with. Could this be used to make the "searching" for the new word a bit faster? Like have it only search through words with the same length as the the specified by the player at the start of the game? Or is that what GKc's code already doing?
Sorry if these are noobish questions, I just have a hard time visualizing code. (hence why I'm having a hard time implementing the cheating algorithm into my code).
Offline
steaksauceyum wrote:
Greenatic wrote:
steaksauceyum wrote:
Yeah I took a look at his. But it seems as though that the game never chooses another word. It changes over and over again after the first guess and goes on and on. Why does it do that?
It has 1799 words. Put it in turbo mode.
Ok I'm new to this haha, is there really a turbo mode?
Also, I designed my game (without the cheating algorithm) to ask for the length of the word you want to play with. Could this be used to make the "searching" for the new word a bit faster? Like have it only search through words with the same length as the the specified by the player at the start of the game? Or is that what GKc's code already doing?
Sorry if these are noobish questions, I just have a hard time visualizing code. (hence why I'm having a hard time implementing the cheating algorithm into my code).
Turbo mode in Flash: Hold down the shift key and click the green flag.
Turbo mode in Scratch: Edit > Set Stepping Speed > Turbo.
One of the flaws of gkc's script is that it doesn't replace words after you delete them. You should make another list, and at the beginning, clear out the word list being used and copy over the duplicate list.
There's a code snippet near the beginning of my project that will clear out all words that do not match the length given.
Last edited by Greenatic (2012-02-26 21:01:05)
Offline
Greenatic wrote:
steaksauceyum wrote:
Greenatic wrote:
It has 1799 words. Put it in turbo mode.Ok I'm new to this haha, is there really a turbo mode?
Also, I designed my game (without the cheating algorithm) to ask for the length of the word you want to play with. Could this be used to make the "searching" for the new word a bit faster? Like have it only search through words with the same length as the the specified by the player at the start of the game? Or is that what GKc's code already doing?
Sorry if these are noobish questions, I just have a hard time visualizing code. (hence why I'm having a hard time implementing the cheating algorithm into my code).Turbo mode in Flash: Hold down the shift key and click the green flag.
Turbo mode in Scratch: Edit > Set Stepping Speed > Turbo.
One of the flaws of gkc's script is that it doesn't replace words after you delete them. You should make another list, and at the beginning, clear out the word list being used and copy over the duplicate list.
There's a code snippet near the beginning of my project that will clear out all words that do not match the length given.
Ok cool thanks!
I'm a bit confused about all of these lists In my original hangman I have "guessed words" and "words" ("words" being the large list of words used to pick a word)
I'm confused about what the other lists mean and do. Do you mind explaining them? I'd appreciate it! I suppose we should stick to Gkc's version? But if you could explain what your lists did in your version (C1, C2, Bool) that would be awesome too!
Offline
steaksauceyum wrote:
Greenatic wrote:
steaksauceyum wrote:
Ok I'm new to this haha, is there really a turbo mode?
Also, I designed my game (without the cheating algorithm) to ask for the length of the word you want to play with. Could this be used to make the "searching" for the new word a bit faster? Like have it only search through words with the same length as the the specified by the player at the start of the game? Or is that what GKc's code already doing?
Sorry if these are noobish questions, I just have a hard time visualizing code. (hence why I'm having a hard time implementing the cheating algorithm into my code).Turbo mode in Flash: Hold down the shift key and click the green flag.
Turbo mode in Scratch: Edit > Set Stepping Speed > Turbo.
One of the flaws of gkc's script is that it doesn't replace words after you delete them. You should make another list, and at the beginning, clear out the word list being used and copy over the duplicate list.
There's a code snippet near the beginning of my project that will clear out all words that do not match the length given.Ok cool thanks!
I'm a bit confused about all of these lists In my original hangman I have "guessed words" and "words" ("words" being the large list of words used to pick a word)
I'm confused about what the other lists mean and do. Do you mind explaining them? I'd appreciate it! I suppose we should stick to Gkc's version? But if you could explain what your lists did in your version (C1, C2, Bool) that would be awesome too!
Woop's didnt realize this was already explained. haha sorry!
I guess my real problem is: how do the lists all fit together? From my "words" to the other ones you created, how do they work together? Just a simple explanation would suffice. Thanks!
Offline
Also I just noticed that gkc's code allows the computer to change the word to a different number of letters. For example, "line" was the word to be guessed, but when I guessed "l" the computer chose the word "the."
Offline
Smozzick wrote:
Well my code is much longer than the above (Read: Badly written) but it's effectively the code for a cheating hangman game:
Link to Project
I really like how you handled it. But is there anyway to just use a list or variable to express if the letters you guessed were right or wrong?
Offline
steaksauceyum wrote:
Smozzick wrote:
Well my code is much longer than the above (Read: Badly written) but it's effectively the code for a cheating hangman game:
Link to ProjectI really like how you handled it. But is there anyway to just use a list or variable to express if the letters you guessed were right or wrong?
Thanks ^^ As to changing how it handles wrong or right...first I should say that that's only on stage because I was using it for testing lol. If you go into it then wherever it has
broadcast [correct v]or
broadcast [wrong v]just replace them with something like:
set [LetterIsRight v] to [1]or
set [LetterIsRight v] to [0]Note: A lot of people use True or False but I use 1 or 0, same meaning.
Last edited by Smozzick (2012-02-28 12:16:54)
Offline
I MADE A SCRIPT THAT WORKS!!! (http://scratch.mit.edu/projects/gkc/2358434)
Offline