Fixed a bug that allowed the computer to have the same name as you.

This commit is contained in:
Storm Dragon 2014-05-04 15:07:29 -04:00
parent 43778d60f9
commit 64d814f007

View File

@ -21,12 +21,11 @@ read -n 1 -p "Press any key to continue. " continue
get_cpu_name() get_cpu_name()
{ {
local playerName=$1 local getCpuNameVariable=$1
local getCpuNameVariable=$2
local continue="false" local continue="false"
while [ "$continue" == "false" ] ; do 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") 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" local continue="true"
fi fi
done done