mirror of
https://github.com/brmlab/brmlife.git
synced 2025-08-02 18:03:37 +02:00
26 lines
372 B
C++
26 lines
372 B
C++
#include <iostream>
|
|
|
|
#include "agent.h"
|
|
#include "map.h"
|
|
|
|
int
|
|
main(int argc, char *argv[])
|
|
{
|
|
class map map(10, 10);
|
|
|
|
class tile &agentpos = map.tile_at(4, 4);
|
|
class agent agent(0, agentpos);
|
|
|
|
map.print_map();
|
|
std::cout << '\n';
|
|
|
|
agent.move_dir(1, 0);
|
|
map.print_map();
|
|
std::cout << '\n';
|
|
|
|
agent.move_dir(0, -1);
|
|
map.print_map();
|
|
std::cout << '\n';
|
|
|
|
return 0;
|
|
}
|