From 12dd76a9018de6a6d41578a4b43a9ceb2123740b Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Mon, 5 May 2014 23:43:35 -0400 Subject: [PATCH] I think bashit is mostly complete, unless someone finds bugs. --- bashit.scoreboard | 10 ---------- bashit/bashit | 10 +++++++++- 2 files changed, 9 insertions(+), 11 deletions(-) delete mode 100644 bashit.scoreboard diff --git a/bashit.scoreboard b/bashit.scoreboard deleted file mode 100644 index a1a5896..0000000 --- a/bashit.scoreboard +++ /dev/null @@ -1,10 +0,0 @@ -18 Storm -0 anonymous -0 anonymous -0 anonymous -0 anonymous -0 anonymous -0 anonymous -0 anonymous -0 anonymous -0 anonymous diff --git a/bashit/bashit b/bashit/bashit index 98d8491..1992629 100755 --- a/bashit/bashit +++ b/bashit/bashit @@ -38,7 +38,7 @@ if [ $newHighScore -gt 0 ] ; then local continue="n" echo "Congratulations! You beat the score at position $newHighScore!" while [ "${continue^}" != "Y" ] ; do -read -p "Enter your name: " name +read -ep "Enter your name: " name if [ -z "$name" ] ; then local name="Anonymous" fi @@ -160,6 +160,8 @@ show_instructions read -n 1 -p "Press any key to continue. " answer fi done +gameLoop="true" +while [ "$gameLoop" == "true" ] ; do clear select_soundpack sound speed="1.50" @@ -229,4 +231,10 @@ echo echo "Score: $score." high_score $score show_scoreboard +read -n 1 -p "Play again? " answer +echo +if [ "${answer^}" != "Y" ] ; then +gameLoop="false" +fi +done exit 0