class Ship

Public Class Methods

new(x, y, faction, map, infopane) click to toggle source
Calls superclass method Unit::new
# File lib/lib/units/ship.rb, line 9
def initialize(x, y, faction, map, infopane)
  super
  dir_path = File.dirname(__FILE__)
  @image = Gosu::Image.new(dir_path + '/../../media/ship.png')

  @armour_left = @armour_max = 1
  @moves_max = 2
  @cargo_max = 3
end

Public Instance Methods

can_sail?() click to toggle source
# File lib/lib/units/ship.rb, line 19
def can_sail?
  true
end