Class: BloodChalice::Peasant
- Inherits:
-
Object
- Object
- BloodChalice::Peasant
- Includes:
- ArtificialIntelligence, Movable, TileValues
- Defined in:
- lib/bloodchalice/peasant.rb
Constant Summary collapse
- MAX_LIFE =
2
- SPEED =
2
- ATTACK =
0
- VISION =
6
- MAXBLOOD =
3
Constants included from Movable
Instance Attribute Summary collapse
-
#blood ⇒ Object
Returns the value of attribute blood.
-
#game ⇒ Object
Returns the value of attribute game.
-
#life ⇒ Object
Returns the value of attribute life.
-
#map ⇒ Object
Returns the value of attribute map.
-
#position ⇒ Object
Returns the value of attribute position.
-
#speed ⇒ Object
Returns the value of attribute speed.
-
#value ⇒ Object
Returns the value of attribute value.
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ Peasant
constructor
A new instance of Peasant.
- #to_s ⇒ Object
Methods included from ArtificialIntelligence
#bited, #die, #hit, #reacts_to, #think
Methods included from TileValues
#chalice?, #empty?, #knight?, #peasant?, #player?, #wall?, #zombie?
Methods included from Movable
#hit, #move, #move!, #moves?, #reactions, #reset_moves
Constructor Details
Instance Attribute Details
#blood ⇒ Object
Returns the value of attribute blood.
7 8 9 |
# File 'lib/bloodchalice/peasant.rb', line 7 def blood @blood end |
#game ⇒ Object
Returns the value of attribute game.
7 8 9 |
# File 'lib/bloodchalice/peasant.rb', line 7 def game @game end |
#life ⇒ Object
Returns the value of attribute life.
7 8 9 |
# File 'lib/bloodchalice/peasant.rb', line 7 def life @life end |
#map ⇒ Object
Returns the value of attribute map.
7 8 9 |
# File 'lib/bloodchalice/peasant.rb', line 7 def map @map end |
#position ⇒ Object
Returns the value of attribute position.
7 8 9 |
# File 'lib/bloodchalice/peasant.rb', line 7 def position @position end |
#speed ⇒ Object
Returns the value of attribute speed.
7 8 9 |
# File 'lib/bloodchalice/peasant.rb', line 7 def speed @speed end |
#value ⇒ Object
Returns the value of attribute value.
7 8 9 |
# File 'lib/bloodchalice/peasant.rb', line 7 def value @value end |
Instance Method Details
#to_s ⇒ Object
25 26 27 |
# File 'lib/bloodchalice/peasant.rb', line 25 def to_s @value.to_s end |