Hangman game stuff

master
E. Almqvist 3 years ago
parent d9b7a43c38
commit 5031701d81
  1. 1
      rep2/.gitignore
  2. 0
      rep2/1.rb
  3. 0
      rep2/2.rb
  4. 0
      rep2/3.rb
  5. 12
      rep2/get_words.sh
  6. 0
      rep2/hangman.rb
  7. 0
      rep2/replace_substring.rb

1
rep2/.gitignore vendored

@ -0,0 +1 @@
words.txt

@ -0,0 +1,12 @@
#!/usr/bin/bash
if [ -z $1 ]; then
echo "Usage: get_words.sh (output file)"
exit
fi
api_url=https://random-word-api.herokuapp.com/all
words=$(curl -s $api_url | sed 's/\",\"/\ /g' | sed 's/\"\]//g' | sed 's/\[\"//g')
echo $words > $1
Loading…
Cancel
Save