-
-
Save leejarvis/d0bda7a44ec4b4be9f81 to your computer and use it in GitHub Desktop.
This file contains 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
def main | |
puts "enter your sigil phrase or word" | |
line = gets.chomp.squeeze!.to_a | |
p line | |
puts "with [1] or without [0] 'y'" | |
y_choice = gets.chomp.to_i | |
to_remove = [ "a", "e", "i", "o", "u" ] | |
if y_choice == 0 | |
to_remove.push("y") | |
end | |
p to_remove | |
line = line - to_remove | |
p line | |
i = 1 | |
while i < line.length - 1 | |
temp = nil | |
slot_one = nil | |
slot_two = nil | |
slot_one = rand(1..line.length - 1).to_i | |
slot_two = rand(1..line.length - 1).to_i | |
p slot_one, slot_two | |
temp = line(slot_one) | |
line(slot_one) = line(slot_two) | |
line(slot_two) = temp | |
i += 1 | |
end | |
end | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment