Created
November 9, 2016 02:56
-
-
Save Sadin/3a589daecfca2bf9a78af1b4e83f0b79 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<21:54:50> "Kria": yo zach does this look right | |
<21:55:22> "Kria": it generates a character list of a specified amount of letters to later be used in the creation of a boggle board | |
<21:55:31> "Kria": char* Game::getLetters(int x){ | |
char letters[x]; | |
int random; | |
char vowelList[5] = "AEIOU"; | |
char consList[21] = "BCDFGHJKLMNPQRSTVWXYZ"; | |
int vowels = rand() % x + 1; | |
for (int i = 0;i<vowels;i++) { | |
random = rand() % 5; | |
letters = vowelList[random]; | |
} // end for | |
for (int i = vowels;i<x;i++) { | |
random = rand() % 21; | |
letters = consList[random]; | |
} // end for | |
return letters; | |
} | |
<21:55:43> "Kria": <3 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment