Skip to content

Instantly share code, notes, and snippets.

@svend
Created November 13, 2017 01:35
Show Gist options
  • Select an option

  • Save svend/942b1853c9fad55645af157c2e6eec75 to your computer and use it in GitHub Desktop.

Select an option

Save svend/942b1853c9fad55645af157c2e6eec75 to your computer and use it in GitHub Desktop.
Harper's sparkle game
#!/usr/bin/env bash
echo "harper's sparkle game"
read -rp "What is the sparkle number? " sparkle_number
echo "The sparkle number is $sparkle_number"
current_number=1
while :; do
read -rp "Enter a number: " number
if [ "$number" != "$current_number" ]; then
echo "You didn't say the right number. Try again!"
continue
fi
current_number=$(($current_number + 1))
done
@svend
Copy link
Author

svend commented Nov 13, 2017

Harper is a boy! This is his first program! It is named Sparkle Game. You can play this game! Dad is saying this to you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment