Method: MapDungeon::Dungeon#has_entity?

Defined in:
lib/map/dungeon.rb

#has_entity?(entity, type) ⇒ Boolean

Returns true if the entity exists

Returns:

  • (Boolean)


31
32
33
# File 'lib/map/dungeon.rb', line 31

def has_entity?(entity, type)
  @entities[type].find { |e| entity.eql?(e) }  
end