-
-
Save illbzo1/1353942 to your computer and use it in GitHub Desktop.
Random Phrase Generator
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
| files = Dir.glob("*.txt") | |
| adjective_list1 = IO.readlines("adj1.txt") | |
| adjective_list2 = IO.readlines("adj2.txt") | |
| noun_list = IO.readlines("noun.txt") | |
| prefix_list = IO.readlines("prefix.txt") | |
| suffix_list = IO.readlines("suffix.txt") | |
| rand1 = rand(adjective_list1.length) | |
| rand2 = rand(adjective_list2.length) | |
| rand3 = rand(noun_list.length) | |
| rand4 = rand(prefix_list.length) | |
| rand5 = rand(suffix_list.length) | |
| adj1 = adjective_list1[rand1].capitalize | |
| adj2 = adjective_list2[rand2].capitalize | |
| noun = noun_list[rand3].capitalize | |
| prefix = prefix_list[rand4].capitalize | |
| suffix = suffix_list[rand5].capitalize | |
| new_phrase = [] | |
| randomizer = rand(7) | |
| case randomizer | |
| when 1..2 | |
| new_phrase << [adj1, adj2, noun, suffix] | |
| when 6..7 | |
| new_phrase << [prefix, adj1, adj2, noun] | |
| else | |
| new_phrase << [adj1, adj2, noun] | |
| end | |
| puts "Generate new phrase?" | |
| input = gets.chomp() | |
| if input == "yes" | |
| puts new_phrase | |
| end | |
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
| super | |
| hyper | |
| ultra | |
| legendary | |
| robotic | |
| operation | |
| virtual | |
| ultimate |
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
| unforgettable | |
| unruly | |
| dangerous | |
| fearsome | |
| mystical | |
| magical |
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
| detectives | |
| turtle | |
| wombat | |
| operatives | |
| wizard | |
| polar bear |
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
| legend of the | |
| return of the | |
| revenge of the | |
| adventures of the | |
| battle of the | |
| quest of the | |
| secret of the | |
| tournament of the | |
| learn to read with the | |
| clash of the |
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
| jr. | |
| strike back | |
| the revenge | |
| strike back | |
| back for more | |
| surf's up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment