Skip to content

kylecronin/boggle-ruby

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a simple implementation of the game Boggle (or Scramble With Friends) in Ruby.

The application itself is boggle.rb. It expects a board as its input on STDIN - the script is not picky about formatting or spacing, just that the word characters on each line be the elements of the board you wish to solve. If there are varying numbers of letters on the lines, an exception is raised.

The script has been hard-coded to expect a dictionary file at /usr/share/dict/words, and will raise an exception if it's not there. Future versions may allow the user to provide the location of a dictionary file as an argument.

A sample board has been provided in sample-board.txt. To solve it, run:

cat sample-board.txt | ruby boggle.rb

This will print out all the words in the dictionary that are playable on the board.



note: Boggle and Scramble With Friends place a "qu" on a single tile. This program does not support that.

About

A simple boggle implementation in Ruby

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages