#include "boat.h"
#include "vibes.h"

extern double dt;
extern double t;
boat::boat()
{
    x=0;y=0,theta=0;v=1; u1=0;u2=0;
}

void boat::Clock()
{       double x1,y1,theta1,v1;
        u2=0.05*(1+sin(0.1*t));
        x1      = x   + dt*v*cos(theta);
        y1      = y   + dt*v*sin(theta);
        v1      = v   + dt*u1;
        theta1  = theta + dt*u2;
        x=x1; y=y1; theta=theta1; v=v1;
}
