I decided I would make a simple unwinnable "rock, paper, scissors" program and it is almost complete, however there is a issue.
I want the user_input
to only respond when called upon, however it activates regardless of if "rock" was input, meaning, instead of typing "rock" and the program responding with "Computer played paper, you lose!" it responds with "played paper, you lose!"
played scissors, you lose!
played rock, you lose!
if #{user_input = rock}
puts "Computer played Paper, You Lose!"
This is the full code:
print "Rock, Paper or Scissors?\n"
user_input = gets.chomp
puts "You played #{user_input}!"
if #{user_input = rock}
puts "Computer played Paper, You Lose!"
end
if #{user_input = paper}
puts "Computer played scissors, You Lose!" #code
end
if #{user_input = scissors}
puts "Computer played rock, You Lose!"
end