Class: Shithead::AI::DealIn
- Inherits:
-
Object
- Object
- Shithead::AI::DealIn
- Defined in:
- lib/shithead/ai/deal_in.rb
Class Method Summary collapse
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(player) ⇒ DealIn
constructor
A new instance of DealIn.
Constructor Details
#initialize(player) ⇒ DealIn
Returns a new instance of DealIn.
6 7 8 |
# File 'lib/shithead/ai/deal_in.rb', line 6 def initialize(player) @player = player end |
Class Method Details
.call(player) ⇒ Object
2 3 4 |
# File 'lib/shithead/ai/deal_in.rb', line 2 def self.call(player) new(player).call end |
Instance Method Details
#call ⇒ Object
10 11 12 13 14 |
# File 'lib/shithead/ai/deal_in.rb', line 10 def call return if player.hand.empty? 3.times { place ordered.shift } end |