diff --git a/horseshoes/horseshoes b/horseshoes/horseshoes index 9fe4c5d..7b28b1b 100755 --- a/horseshoes/horseshoes +++ b/horseshoes/horseshoes @@ -153,6 +153,8 @@ else player[2]="$(get_cpu_name)" vsCpu="true" fi +gameLoop="true" +while [ "$gameLoop" == "true" ] ; do playerCounter=1 score[1]=0 score[2]=0 @@ -218,4 +220,9 @@ else echo "${player[2]} wins with a score of ${score[2]} to ${score[1]}!" fi play -qV0 sounds/win.ogg +read -n 1 -p "Play again? " answer +if [ "${answer^}" != "Y" ] ; then +gameLoop="false" +fi +done exit 0