Class: Computer

Inherits:
Player show all
Defined in:
lib/player.rb

Instance Attribute Summary

Attributes inherited from Player

#choice

Instance Method Summary collapse

Methods inherited from Player

#initialize

Constructor Details

This class inherits a constructor from Player

Instance Method Details

#make_choiceObject



26
27
28
29
30
# File 'lib/player.rb', line 26

def make_choice
  options = ["rock", "paper", "scissors"]
  puts "Player 2 is choosing now"
  @choice = options.sample
end