tryPlaceAt

fun tryPlaceAt(agent: A, cell: Cell): Boolean(source)

Conditional placement for single-occupancy grids: returns true if the cell was free (or already held this agent) and the placement succeeded; false if the cell was occupied by another agent. Always succeeds for multi-occupancy grids.