class Tundengine::Deck
Constants
- CARDS
- DECLARATIONS
- RANKS
- RANK_CLASSES
- SUITS
- SUIT_CLASSES
Public Class Methods
cards_of(ranks = RANKS, suits = SUITS)
click to toggle source
# File lib/tundengine/deck.rb, line 34 def cards_of(ranks = RANKS, suits = SUITS) CARDS.select { |c| c.is_of_any_rank? ranks and c.is_of_any_suit? suits } end
for(number_of_players, trump_suit)
click to toggle source
# File lib/tundengine/deck.rb, line 23 def for(number_of_players, trump_suit) case number_of_players when 3 CARDS - [Ranks::Dos.de(trump_suit)] when 4..5 CARDS else raise "invalid number of players: #{number_of_players}" end end