Class: Building

Inherits:
TileItem show all
Defined in:
lib/building.rb

Overview

Represents a building item on a tile

Constant Summary collapse

TOWN_RENDER_PRIORITY =
DEFAULT_RENDER_PRIORITY + 1
HOUSE =
"\u{1F3E0}"

Constants inherited from TileItem

TileItem::DEFAULT_RENDER_PRIORITY

Instance Attribute Summary

Attributes inherited from TileItem

#colour, #id, #obj, #render_priority, #render_symbol

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from TileItem

#to_h

Constructor Details

#initialize(render_symbol) ⇒ Building

Returns a new instance of Building.



13
14
15
# File 'lib/building.rb', line 13

def initialize(render_symbol)
  super self, render_symbol: render_symbol, render_priority: TOWN_RENDER_PRIORITY
end

Class Method Details

.random_town_building(_seed) ⇒ Object



17
18
19
# File 'lib/building.rb', line 17

def self.random_town_building(_seed)
  Building.new(HOUSE)
end