Class: WiesenbergGemBuildingPractice::RockPaperScissors::Computer

Inherits:
Player
  • Object
show all
Defined in:
lib/wiesenberg_gem_building_practice.rb

Overview

class Human

Instance Attribute Summary

Attributes inherited from Player

#handshape, #name

Instance Method Summary collapse

Methods inherited from Player

#initialize

Constructor Details

This class inherits a constructor from WiesenbergGemBuildingPractice::RockPaperScissors::Player

Instance Method Details

#choose_handshapeObject



150
151
152
153
154
# File 'lib/wiesenberg_gem_building_practice.rb', line 150

def choose_handshape
  puts "\n Computer is choosing ..."
  sleep(0.5)
  @handshape = [:rock, :paper, :scissors].sample
end