B brianwiz12 Active Member Licensed User Longtime User Apr 21, 2014 #1 Hello, I see a lot of tutorials for shuffling of numbers. Im looking for a tutorial or advice how to do the following: User sees a word(scrambled/mixed up) User enters what they believe it is. They hit a button if its correct move on.. if not etc. Now I have the code for moving on if a button is selected. I have it where they type in what they see on the screen and can check it. But I want something more depth I can develop a bigger program... I used to program in VB6 a long long time ago. I can make simple easy programs but this stuff trips me up.
Hello, I see a lot of tutorials for shuffling of numbers. Im looking for a tutorial or advice how to do the following: User sees a word(scrambled/mixed up) User enters what they believe it is. They hit a button if its correct move on.. if not etc. Now I have the code for moving on if a button is selected. I have it where they type in what they see on the screen and can check it. But I want something more depth I can develop a bigger program... I used to program in VB6 a long long time ago. I can make simple easy programs but this stuff trips me up.
Erel B4X founder Staff member Licensed User Longtime User Apr 21, 2014 #2 The code example here shuffles a list of characters: http://www.b4x.com/android/forum/threads/shufflelist.39325/ Upvote 0
The code example here shuffles a list of characters: http://www.b4x.com/android/forum/threads/shufflelist.39325/
B brianwiz12 Active Member Licensed User Longtime User Apr 21, 2014 #3 Here is the code I got for manual word game Sub Globals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. DimlblbusAsLabel DimlblquestionAsLabel DimlblyornAsLabel DimbtnverifyAsButton DimedtanswerAsEditText DimbusAsChar DimaAsChar End Sub Sub Activity_Create(FirstTime AsBoolean) 'Do not forget to load the layout file created with the visual designer. For example: 'Activity.LoadLayout("Layout1") Activity.LoadLayout("correctanswer") End Sub Sub btnverify_click bus = a Ifedtanswer.Text = busThen lblyorn.Text = "correct" Else lblyorn.text = "incorrect" EndIf End Sub ------------ Im looking to get it where I display the word in mixed up letters and then when they figure out the correct word and type it in they get a response correct or not correct Upvote 0
Here is the code I got for manual word game Sub Globals 'These global variables will be redeclared each time the activity is created. 'These variables can only be accessed from this module. DimlblbusAsLabel DimlblquestionAsLabel DimlblyornAsLabel DimbtnverifyAsButton DimedtanswerAsEditText DimbusAsChar DimaAsChar End Sub Sub Activity_Create(FirstTime AsBoolean) 'Do not forget to load the layout file created with the visual designer. For example: 'Activity.LoadLayout("Layout1") Activity.LoadLayout("correctanswer") End Sub Sub btnverify_click bus = a Ifedtanswer.Text = busThen lblyorn.Text = "correct" Else lblyorn.text = "incorrect" EndIf End Sub ------------ Im looking to get it where I display the word in mixed up letters and then when they figure out the correct word and type it in they get a response correct or not correct
B brianwiz12 Active Member Licensed User Longtime User Apr 21, 2014 #4 Of course I want this to be auto and not manual so. If I give a 1k words to unscramble it goes and goes until the end. Upvote 0
Of course I want this to be auto and not manual so. If I give a 1k words to unscramble it goes and goes until the end.
DonManfred Expert Licensed User Longtime User Apr 22, 2014 #5 Maybe you should better describe exactly what you have so far and what you want to be the result. Put examples in you description... And, USE Code-Tags when posting code in forum! brianwiz12 said: If I give a 1k words to unscramble it goes and goes until the end. Click to expand... You want to scramble a word with 1000 characters? Which word ha such a length? brianwiz12 said: Of course I want this to be auto and not manual so. Click to expand... So, write a sub for it then? Maybe this is part of a better description of the problem? Last edited: Apr 22, 2014 Upvote 0
Maybe you should better describe exactly what you have so far and what you want to be the result. Put examples in you description... And, USE Code-Tags when posting code in forum! brianwiz12 said: If I give a 1k words to unscramble it goes and goes until the end. Click to expand... You want to scramble a word with 1000 characters? Which word ha such a length? brianwiz12 said: Of course I want this to be auto and not manual so. Click to expand... So, write a sub for it then? Maybe this is part of a better description of the problem?