Skip to content

Conversation

Jenniered
Copy link

No description provided.

Copy link

@Hafizalimi7 Hafizalimi7 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so far so good, keep up the good work


run! if app_file == $0
end

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

App file is nice and understandable !

<h1 style="font-family: Tahoma" >
Let's play Joe
</h1>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good change of font

@@ -0,0 +1,10 @@
class ComputerChoice
def initialize
@choices = ["Rock", "Paper", "Scissors"]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put @choice object out of initialiser method

def game_result
if @player_choice == "Rock" && @computer_choice == "Scissors"
return "Win"
elsif @player_choice == "Rock" && @computer_choice == "Paper"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of if statements , nice !

return "Win"
elsif @player_choice == "Scissors" && @computer_choice == "Rock"
return "Lose"
else

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

possibly could do one line if statements , i.e
if @player_choice == "Rock" && @computer_choice == "Scissors" || @player_choice == "Paper" && @computer_choice == "Rock"
return "Win"

end



Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

very precise code !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants