03-03-2009 01:35 PM
Hello guys,
for school we need to make a Labview application;
it is a combination between the game Mastermind and Bingo.
You need to guess a word of five letters and you have 5 chances.
We need to build a detection if the word we guesed has the right letters and if the place is correct.
for example : WATER
1) DRUNK (R correct but not correct place)
2) RANKS (A correct, correct place)
3) WATER (correct)
We have to solve this problem with arrays that split the word in 5 bits. The teacher told us that it would go faster if you convert the array to the Ascii code...
The array thing I understand but the problem of detect the right place and detect if the words are @ the good place I don't understand...
grz,
K
03-03-2009 01:40 PM
Sow I forget the question 🙂
can somebody help me to give an example of say how to begin
tnx
K
03-03-2009 06:10 PM - edited 03-03-2009 06:11 PM
03-03-2009 06:41 PM - edited 03-03-2009 06:41 PM
Seriously, now. That was funny!
So you understand the array thing, good. Look into what happens when you compare two arrays for equality and you'll have half of your result. The other half of the challenge is to find how many letters are in the word, regardless of position. This time you need to use a For Loop with one array auto-indexed and the other not; search for each element of the first in the second. You'll need a shift-register for this (to keep count).
I have a VI that does this and I'll share more details if you'll show your work and ask specific questions about what you've done and what you're seeing. That's how this forum works; you couldn't pay us to do your homework. Perhaps this is why this question has gone unanswered for so long...
03-04-2009 03:08 AM
Ok tnx,
I'll try this and send you updates of my exercise
grz,
K