Rock, Paper, Scissors is fixed.
This commit is contained in:
		| @@ -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!" | ||||
|   | ||||
		Reference in New Issue
	
	Block a user