Hello.
I am making a wheel of fortune game and am getting stuck. This loop keeps repeating the first line "Incorrect input. You can only pick a vowel." Also, I can't get the phrase to read the vowel and say, "Sorry, this vowel was already revealed." If the vowel was already shown.
This is the code:
bool isVowel = true;
int counter;
char vowel;
int length;
length = static_cast<int>(puzzle.size());
if (score[player] >= 250)
{
cout << "Player " << player + 1 << ", pick a vowel -> ";
cin >> vowel;
for (counter = 0; counter < length; counter++)
{
if (vowel != 'a' || vowel != 'e' || vowel != 'i' || vowel != 'o' || vowel != 'u')
{
cout << "Incorrect input. You can only pick a vowel." << endl;
isVowel = true;
}
else if (phrase[counter] == vowel)
{
cout << "Sorry, this vowel is already revealed." << endl;
isVowel = true;
}
else
{
cout << "Congradulations player" << player + 1 << "!" << endl;
cout << "There are " << counter << " " << vowel << "'s in the puzzle." << endl;
isVowel = false;
}
}
}
else
{
cout << "You do not have enough money to buy a vowel." << endl;
isVowel = true;
}