Class: RDGC::Map::Road

Inherits:
Area
  • Object
show all
Defined in:
lib/rdgc/map/road.rb

Constant Summary

Constants included from TileType

TileType::OUT, TileType::ROAD, TileType::ROOM, TileType::WALL

Instance Attribute Summary

Attributes inherited from Area

#bottom, #left, #right, #top

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Area

#blind_level, #blind_level_blind?, #blind_level_dark?, #blind_level_none?, #blind_level_open?, #coordinates, #each, #each_tile, #each_x, #each_y, #fill_tile, #has_xy?, #height, #random_point, #set_blind, #set_tile, #tile, #width

Class Method Details

.create(top, bottom, left, right) ⇒ Object



6
7
8
9
10
# File 'lib/rdgc/map/road.rb', line 6

def self.create(top, bottom, left, right)
  road = super(top, bottom, left, right)
  road.fill
  road
end

Instance Method Details

#fillObject



12
13
14
15
# File 'lib/rdgc/map/road.rb', line 12

def fill
  fill_tile TileType::ROAD
  self
end