Class: VikingRoom7::Computer
- Defined in:
- lib/viking_room7/computer.rb
Instance Attribute Summary
Attributes inherited from Player
Instance Method Summary collapse
- #get_hand ⇒ Object
-
#initialize ⇒ Computer
constructor
A new instance of Computer.
Methods inherited from Player
Constructor Details
#initialize ⇒ Computer
Returns a new instance of Computer.
4 5 6 |
# File 'lib/viking_room7/computer.rb', line 4 def initialize super("computer") end |
Instance Method Details
#get_hand ⇒ Object
8 9 10 11 |
# File 'lib/viking_room7/computer.rb', line 8 def get_hand hand = ["r", 'p', 's'].sample @hand = hand end |