Class: BloodChalice::Tile
- Inherits:
-
Object
- Object
- BloodChalice::Tile
- Includes:
- TileValues
- Defined in:
- lib/bloodchalice/tile.rb
Instance Attribute Summary collapse
-
#position ⇒ Object
Returns the value of attribute position.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(position, value) ⇒ Tile
constructor
A new instance of Tile.
- #to_s ⇒ Object
Methods included from TileValues
#chalice?, #empty?, #knight?, #peasant?, #player?, #wall?, #zombie?
Constructor Details
#initialize(position, value) ⇒ Tile
Returns a new instance of Tile.
36 37 38 39 |
# File 'lib/bloodchalice/tile.rb', line 36 def initialize(position, value ) @value = value @position = position end |
Instance Attribute Details
#position ⇒ Object
Returns the value of attribute position.
34 35 36 |
# File 'lib/bloodchalice/tile.rb', line 34 def position @position end |
#value ⇒ Object
Returns the value of attribute value.
34 35 36 |
# File 'lib/bloodchalice/tile.rb', line 34 def value @value end |
Instance Method Details
#to_s ⇒ Object
41 42 43 |
# File 'lib/bloodchalice/tile.rb', line 41 def to_s @value.to_s end |