From a368dcda1739f37c748846137c2be462e1da2948 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sun, 4 May 2014 22:02:28 -0400 Subject: [PATCH] Shouldn't allow blank names any more. --- horseshoes/horseshoes | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/horseshoes/horseshoes b/horseshoes/horseshoes index d9dccd3..39b3dd4 100755 --- a/horseshoes/horseshoes +++ b/horseshoes/horseshoes @@ -138,12 +138,16 @@ fi fi echo "Welcome to horseshoes." if [ "$1" != "c" ] ; then +while [ -z "${player[1]}" ] ; do read -p "Player 1, please enter your name: " player[1] +done else player[1]="$(get_cpu_name)" fi if [[ "$1" =~ 2 ]] ; then +while [ -z "${player[2]}" ] ; do read -p "Player 2, please enter your name: " player[2] +done vsCpu="false" else player[2]="$(get_cpu_name)"