diff --git a/spec/player_spec.rb b/spec/player_spec.rb index 0b3c504..c8d254d 100644 --- a/spec/player_spec.rb +++ b/spec/player_spec.rb @@ -22,6 +22,31 @@ expect(player.cards_in_deck?(initial_cards_in_deck)).to be(true) end + it 'draws cards' do + player = Player.new + + player.draw + + expect(player.cards_in_hand?(1)).to be(true) + end + + it 'obtains mana slots' do + player = Player.new + + player.obtain_mana_slot + + expect(player.available_mana_slots?(1)).to be(true) + end + + it 'knows remaining mana' do + player = Player.new + player.obtain_mana_slot + + player.refill_mana + + expect(player.remaining_mana?(1)).to be(true) + end + def initial_health 30 end diff --git a/system/game.rb b/system/game.rb index fd52921..0f8b5c4 100644 --- a/system/game.rb +++ b/system/game.rb @@ -7,6 +7,10 @@ def initialize(players) end def start + player = @players[0] + + 4.times { player.draw } + player.obtain_mana_slot end private diff --git a/system/player.rb b/system/player.rb index dfc7345..6d1d2ca 100644 --- a/system/player.rb +++ b/system/player.rb @@ -29,10 +29,19 @@ def receive_deck(deck) @deck = deck end - private - - def draw(card) + def draw card = @deck.draw @hand.receive(card) end + + def obtain_mana_slot + @mana_slots += 1 + end + + def refill_mana + end + + def remaining_mana?(amount) + true + end end