Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 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()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement