From 64d814f00768521f5765eb72c6b0884459d41dcb Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Sun, 4 May 2014 15:07:29 -0400 Subject: [PATCH] Fixed a bug that allowed the computer to have the same name as you. --- horseshoes/horseshoes | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/horseshoes/horseshoes b/horseshoes/horseshoes index b5d9f5f..45b5721 100755 --- a/horseshoes/horseshoes +++ b/horseshoes/horseshoes @@ -21,12 +21,11 @@ read -n 1 -p "Press any key to continue. " continue get_cpu_name() { -local playerName=$1 -local getCpuNameVariable=$2 +local getCpuNameVariable=$1 local continue="false" while [ "$continue" == "false" ] ; do local cpuName=$(shuf -n 1 -e "Alicia" "Alonzo" "Anthony" "Billy" "Burt" "Cayden" "Dorothy" "Draken" "Dave" "Ember" "Jeremy" "Kendell" "Kyle" "Storm" "Tux") -if [ "${playerName^}" != "${cpuName^}" ] ; then +if [ "${player[1]^}" != "${cpuName^}" ] ; then local continue="true" fi done