fized formatting

main
s00ner 2022-12-02 16:15:20 -05:00
parent 68cfd1d819
commit 1fd63649f6
1 changed files with 5 additions and 3 deletions

View File

@ -1,4 +1,6 @@
#!/bin/env ruby
# frozen_string_literal: true
require 'pry'
def score(opponent, me)
@ -13,9 +15,9 @@ def score(opponent, me)
return 3 + base if opponent == me
outcome = 0
outcome = 6 if opponent == :rock and me == :paper
outcome = 6 if opponent == :paper and me == :scissors
outcome = 6 if opponent == :scissors and me == :rock
outcome = 6 if (opponent == :rock) && (me == :paper)
outcome = 6 if (opponent == :paper) && (me == :scissors)
outcome = 6 if (opponent == :scissors) && (me == :rock)
outcome + base
end