Class: Hand

Inherits:
Cards show all
Defined in:
lib/ascension/cards.rb

Instance Attribute Summary

Attributes inherited from Cards

#game, #side

Instance Method Summary collapse

Methods inherited from Cards

#<<, #[], #[]=, #banish, #clear!, #each, #empty?, #first, #get_one, #hydrate!, #include?, #index, #pop, #remove, #shuffle!, #size, #to_s_cards

Instance Method Details

#discard!Object



93
94
95
96
# File 'lib/ascension/cards.rb', line 93

def discard!
  each { |c| side.discard << c }
  clear!
end

#play_all!Object



88
89
90
91
92
# File 'lib/ascension/cards.rb', line 88

def play_all!
  while size > 0
    side.play(first)
  end
end