struct machine { depth at; int x, y; machine(grid const& bit, int xyspeed, int zspeed, int maxspeed); void move(int x, int y, depth at); void cut(int x, int y, depth at); void stop(); private: depth mat; int mx, my, mspeed; const int bitx, bity; const int xyspeed, zspeed, maxspeed; const int res_per_meter; void go(int x, int y, depth at, int speed); void finish(); };