Class: Computer
Constant Summary
Constants inherited from Player
Instance Attribute Summary
Attributes inherited from Player
#item, #name, #total_losses, #total_ties, #total_wins
Instance Method Summary collapse
-
#initialize ⇒ Computer
constructor
A new instance of Computer.
- #select_weapon ⇒ Object
Methods inherited from Player
#add_loss, #add_tie, #add_win, #render_selection, #render_stats
Constructor Details
#initialize ⇒ Computer
Returns a new instance of Computer.
49 50 51 |
# File 'lib/rock_paper_scissors_cli/player.rb', line 49 def initialize() super("Computer") end |
Instance Method Details
#select_weapon ⇒ Object
53 54 55 |
# File 'lib/rock_paper_scissors_cli/player.rb', line 53 def select_weapon @item = WEAPONS.shuffle.first end |