Class: VikingRoom7::Player

Inherits:
Object
  • Object
show all
Defined in:
lib/viking_room7/player.rb

Direct Known Subclasses

Computer, Human

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name) ⇒ Player

Returns a new instance of Player.



5
6
7
8
# File 'lib/viking_room7/player.rb', line 5

def initialize(name)
  @name = name
  @hand = "r"
end

Instance Attribute Details

#handObject

Returns the value of attribute hand.



3
4
5
# File 'lib/viking_room7/player.rb', line 3

def hand
  @hand
end

#nameObject

Returns the value of attribute name.



3
4
5
# File 'lib/viking_room7/player.rb', line 3

def name
  @name
end

Instance Method Details

#throwObject



10
11
# File 'lib/viking_room7/player.rb', line 10

def throw
end