Class: Army
Instance Attribute Summary
Attributes inherited from Unit
#cargo, #faction, #function, #x, #y
Instance Method Summary collapse
- #can_ride? ⇒ Boolean
-
#initialize(x, y, faction, map, infopane) ⇒ Army
constructor
A new instance of Army.
Methods inherited from Unit
#can_build?, #can_fly?, #can_move, #can_sail?, #can_transport?, #capture, #check_movement, #destroy, #draw, #function!, #info, #is_transporting?, #reset_moves, #set_function, #tile_check, #to_s, #update
Constructor Details
#initialize(x, y, faction, map, infopane) ⇒ Army
Returns a new instance of Army.
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/army.rb', line 4 def initialize(x, y, faction, map, infopane) super dir_path = File.dirname(__FILE__) @image = Gosu::Image.new(dir_path + '/media/army.png') @name = 'army' @value = 5 @armor_left = @armor_max = 3 @moves_max = 5 end |
Instance Method Details
#can_ride? ⇒ Boolean
15 16 17 |
# File 'lib/army.rb', line 15 def can_ride? true end |