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