Class: Card
- Inherits:
-
Object
- Object
- Card
- Defined in:
- lib/manasimu/card.rb
Instance Attribute Summary collapse
-
#card_type ⇒ Object
Returns the value of attribute card_type.
-
#id ⇒ Object
Returns the value of attribute id.
Instance Method Summary collapse
- #color_identity ⇒ Object
- #color_identity_size ⇒ Object
- #converted_mana_cost ⇒ Object
- #drawed(turn) ⇒ Object
- #edges(lands) ⇒ Object
-
#initialize(card_type) ⇒ Card
constructor
A new instance of Card.
- #mana ⇒ Object
- #mana_cost ⇒ Object
- #mana_source? ⇒ Boolean
- #max_flow(lands) ⇒ Object
- #playable?(lands) ⇒ Boolean
- #played(turn) ⇒ Object
- #played? ⇒ Boolean
- #price ⇒ Object
- #step(turn) ⇒ Object
- #tapped? ⇒ Boolean
- #to_s ⇒ Object
- #types ⇒ Object
Constructor Details
#initialize(card_type) ⇒ Card
Returns a new instance of Card.
4 5 6 |
# File 'lib/manasimu/card.rb', line 4 def initialize(card_type) @card_type = card_type end |
Instance Attribute Details
#card_type ⇒ Object
Returns the value of attribute card_type.
2 3 4 |
# File 'lib/manasimu/card.rb', line 2 def card_type @card_type end |
#id ⇒ Object
Returns the value of attribute id.
2 3 4 |
# File 'lib/manasimu/card.rb', line 2 def id @id end |
Instance Method Details
#color_identity ⇒ Object
44 45 46 |
# File 'lib/manasimu/card.rb', line 44 def color_identity @card_type.color_identity end |
#color_identity_size ⇒ Object
52 53 54 |
# File 'lib/manasimu/card.rb', line 52 def color_identity_size @card_type.color_identity_size end |
#converted_mana_cost ⇒ Object
48 49 50 |
# File 'lib/manasimu/card.rb', line 48 def converted_mana_cost @card_type.converted_mana_cost end |
#drawed(turn) ⇒ Object
11 12 13 14 |
# File 'lib/manasimu/card.rb', line 11 def drawed(turn) @drawed = turn @card_type.drawed(turn) end |
#edges(lands) ⇒ Object
68 69 70 |
# File 'lib/manasimu/card.rb', line 68 def edges(lands) @card_type.edges(lands) end |
#mana ⇒ Object
40 41 42 |
# File 'lib/manasimu/card.rb', line 40 def mana @card_type.mana end |
#mana_cost ⇒ Object
56 57 58 |
# File 'lib/manasimu/card.rb', line 56 def mana_cost @card_type.mana_cost end |
#mana_source? ⇒ Boolean
28 29 30 |
# File 'lib/manasimu/card.rb', line 28 def mana_source? @card_type.mana_source? end |
#max_flow(lands) ⇒ Object
64 65 66 |
# File 'lib/manasimu/card.rb', line 64 def max_flow(lands) @card_type.max_flow(lands) end |
#playable?(lands) ⇒ Boolean
32 33 34 |
# File 'lib/manasimu/card.rb', line 32 def playable?(lands) @card_type.playable?(lands) end |
#played(turn) ⇒ Object
16 17 18 19 |
# File 'lib/manasimu/card.rb', line 16 def played(turn) @played = turn @card_type.played(turn) end |
#played? ⇒ Boolean
20 21 22 |
# File 'lib/manasimu/card.rb', line 20 def played? @played.nil? end |
#price ⇒ Object
60 61 62 |
# File 'lib/manasimu/card.rb', line 60 def price @card_type.price end |
#step(turn) ⇒ Object
8 9 |
# File 'lib/manasimu/card.rb', line 8 def step(turn) end |
#tapped? ⇒ Boolean
24 25 26 |
# File 'lib/manasimu/card.rb', line 24 def tapped? false end |
#to_s ⇒ Object
72 73 74 |
# File 'lib/manasimu/card.rb', line 72 def to_s @card_type.to_s end |
#types ⇒ Object
36 37 38 |
# File 'lib/manasimu/card.rb', line 36 def types @card_type.types end |