Rock, Paper, Scissors is fixed.

This commit is contained in:
Storm Dragon 2016-09-03 10:25:55 -04:00
parent 0178eb057f
commit 4e6a3c0dd1

View File

@ -16,19 +16,19 @@ case "${player^^}" in
player="INVALID"
esac
if [ "$player" = "INVALID" ]; then
if [[ "$player" = "INVALID" ]]; then
msg "$2" "$1: Please select PAPER, ROCK, or SCISSORS."
elif [ "$cpu" = "$player" ]; then
elif [[ "$cpu" = "$player" ]]; then
msg "$2" "$1: You and I both selected $player, so we tied."
elif [ "$cpu" = "PAPER" && "$player" != "SCISSORS" ]; then
msg "$2" "$1: my $CPU beats your $player!"
elif [ "$cpu" = "ROCK" && "$player" != "PAPER" ]; then
msg "$2" "$1: my $CPU beats your $player!"
elif [ "$cpu" = "SCISSORS" && "$player" != "ROCK" ]; then
msg "$2" "$1: my $CPU beats your $player!"
elif [ "$player" = "PAPER" && "$cpu" != "SCISSORS" ]; then
elif [[ "$cpu" = "PAPER" && "$player" != "SCISSORS" ]]; then
msg "$2" "$1: my $cpu beats your $player!"
elif [[ "$cpu" = "ROCK" && "$player" != "PAPER" ]]; then
msg "$2" "$1: my $cpu beats your $player!"
elif [[ "$cpu" = "SCISSORS" && "$player" != "ROCK" ]]; then
msg "$2" "$1: my $cpu beats your $player!"
elif [[ "$player" = "PAPER" && "$cpu" != "SCISSORS" ]]; then
msg "$2" "$1: your $player beats my $cpu!"
elif [ "$player" = "ROCK" && "$cpu" != "PAPER" ]; then
elif [[ "$player" = "ROCK" && "$cpu" != "PAPER" ]]; then
msg "$2" "$1: your $player beats my $cpu!"
else
msg "$2" "$1: your $player beats my $cpu!"