November 2008
Intermediate to advanced
208 pages
4h 32m
English
As I mentioned in "#29 Sudoku Solver" on Sudoku Solver, word scramble is a classic game. There is something fascinating about a game that can hold your attention while exercising your vocabulary. This classic game can be found in newspapers, magazines, and even books dedicated solely to word scrambles. But who needs those when you can customize your own game?
unless ARGV[0] and File.exists?(ARGV[0])
puts "\n\nUsage is wordScramble.rb <word.file>\n\n"
exit
end
tries = 10
words = File.readlines(ARGV[0])
mystery_word = words[rand(words.size)].chomp
scramble_word = mystery_word.split(//).sort_by{rand}.join ...Read now
Unlock full access