mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-02 18:03:37 +02:00
16 lines
271 B
C++
16 lines
271 B
C++
#include <cassert>
|
|
#include <cstdlib>
|
|
#include <iostream>
|
|
|
|
#include "agent.h"
|
|
#include "map.h"
|
|
|
|
void
|
|
agent::put_at(struct position *pos)
|
|
{
|
|
class tile *t = &pos->map->tile_at(*pos);
|
|
if (!t->on_agent_enter(this)) {
|
|
std::cerr << "Collision.";
|
|
exit(EXIT_FAILURE);
|
|
}
|
|
}
|