Class: RockPaperScissors::Player
- Inherits:
-
Object
- Object
- RockPaperScissors::Player
- Defined in:
- lib/rock_paper_scissors/player.rb
Instance Attribute Summary collapse
-
#name ⇒ Object
Returns the value of attribute name.
Instance Method Summary collapse
-
#initialize(board, player_number = 1) ⇒ Player
constructor
A new instance of Player.
Constructor Details
#initialize(board, player_number = 1) ⇒ Player
Returns a new instance of Player.
5 6 7 8 |
# File 'lib/rock_paper_scissors/player.rb', line 5 def initialize(board, player_number = 1) @board = board @player_number = player_number end |
Instance Attribute Details
#name ⇒ Object
Returns the value of attribute name.
3 4 5 |
# File 'lib/rock_paper_scissors/player.rb', line 3 def name @name end |