added dictionary and dictionary parsing into an array
This commit is contained in:
parent
62e889e3bf
commit
cfccae02cd
11
hangman.rb
Normal file
11
hangman.rb
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#hangman game
|
||||||
|
#01/21/2022
|
||||||
|
|
||||||
|
#load in dictionary file
|
||||||
|
#select random word between 5 and 12 letters long
|
||||||
|
a = Array.new
|
||||||
|
dictionary = File.open('5desk.txt')
|
||||||
|
dictionary.each do |row|
|
||||||
|
a.push(row)
|
||||||
|
puts row
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user