Class: Card

Inherits:
Object
  • Object
show all
Defined in:
lib/manasimu/card.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_typeObject

Returns the value of attribute card_type.



2
3
4
# File 'lib/manasimu/card.rb', line 2

def card_type
  @card_type
end

#idObject

Returns the value of attribute id.



2
3
4
# File 'lib/manasimu/card.rb', line 2

def id
  @id
end

Instance Method Details

#color_identityObject



44
45
46
# File 'lib/manasimu/card.rb', line 44

def color_identity
  @card_type.color_identity
end

#color_identity_sizeObject



52
53
54
# File 'lib/manasimu/card.rb', line 52

def color_identity_size
  @card_type.color_identity_size
end

#converted_mana_costObject



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

#manaObject



40
41
42
# File 'lib/manasimu/card.rb', line 40

def mana
  @card_type.mana
end

#mana_costObject



56
57
58
# File 'lib/manasimu/card.rb', line 56

def mana_cost
  @card_type.mana_cost
end

#mana_source?Boolean

Returns:

  • (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

Returns:

  • (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

Returns:

  • (Boolean)


20
21
22
# File 'lib/manasimu/card.rb', line 20

def played?
  @played.nil?
end

#priceObject



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

Returns:

  • (Boolean)


24
25
26
# File 'lib/manasimu/card.rb', line 24

def tapped?
  false
end

#to_sObject



72
73
74
# File 'lib/manasimu/card.rb', line 72

def to_s
  @card_type.to_s
end

#typesObject



36
37
38
# File 'lib/manasimu/card.rb', line 36

def types
  @card_type.types
end