lib/demiurge/location.rb
def can_accomodate_agent?(agent, position)
      loc, x, y = TiledLocation.position_to_loc_coords(position)
      raise "Location #{@name.inspect} asked about different location #{loc.inspect} in can_accomodate_agent!" if loc != @name
      shape = agent.state["shape"] || "humanoid"
      can_accomodate_shape?(x, y, shape)
    end
# Determine whether this position can accomodate the given agent's shape and size.
#
# @param agent [Demiurge::Agent] The agent being checked
# @param position [String] The position being checked
# @return [Boolean] Whether the position can accomodate the agent
# @since 0.2.0
Determine whether this position can accomodate the given agent's shape and size.
Determine whether this position can accomodate the given agent ' s shape and size .
def can_accomodate_agent?(agent, position)
      loc, x, y = TiledLocation.position_to_loc_coords(position)
      raise "Location #{@name.inspect} asked about different location #{loc.inspect} in can_accomodate_agent!" if loc != @name
      shape = agent.state["shape"] || "humanoid"
      can_accomodate_shape?(x, y, shape)
    end
def can_accomodate_agent? ( agent , position ) loc , x , y = TiledLocation . position_to_loc_coords ( position ) raise "Location #{@name.inspect} asked about different location #{loc.inspect} in can_accomodate_agent!" if loc != @name shape = agent . state [ "shape" ] || "humanoid" can_accomodate_shape? ( x , y , shape ) end
Determine whether this position can accomodate the given agent's shape and size.
Determine whether this position can accomodate the given agent ' s shape and size .
Whether the position can accomodate the agent
Whether the position can accomodate the agent
Boolean
agent
The agent being checked
The agent being checked
position
The position being checked
The position being checked
since
None