January 2004
Intermediate to advanced
368 pages
7h 25m
English
If you've seen the Jumble game in your newspaper or played word games at all, you're familiar with the basic concept of this game: A word is picked at random and then scrambled. Your task is to figure out and guess what the original word is in the minimum number of turns.
#!/bin/sh # unscramble - Picks a word, scrambles it, and asks the user to guess # what the original word (or phrase) was. wordlib="/usr/lib/games/long-words.txt" randomquote="$HOME/bin/randomquote" # Script #76 scrambleword() { # Pick a word randomly from the wordlib, and scramble it. # Original word is $match and scrambled word is $scrambled match="$($randomquote $wordlib)" echo "Picked out a word!" len=$(echo $match | wc -c | sed ...Read now
Unlock full access