Effect the following only if the cat is still heading in the same direction (towards point X).

She moves one step vertically and horizontally with current speed and shift factor.

If the mouse cursor appears 5 pixels away from the cat or closer, the cat assumes that she has already reached point X and should to go somewhere else. Moreover, she should not walk but run there.

If the cat has been running and has made the number of steps she has to make to calm down, she regains her calm, slows down to one step at a time and walks leisurely.

If the cat has been walking and has made the number of steps she had to make to reach point X, she should decide for herself whether she will take a rest before setting off for another point X.

In 3 out of 700 cases she doesn’t stop and begins to move in a new direction right away.

If this is the case, the cat gathers that she has reached the point she was going to, and so she is not supposed to sit down or relax anyhow.

But if it is one of the 698 cases when the cat rests before her next move, then she, firstly, has to sit down (if she is not yet sitting) and, secondly, realize that she is sitting.

While so, the number of steps the cat makes at a time equals to zero, and her vertical and horizontal shift is also zero.

If the cursor appears 30 pixels away from the cat or closer when she is sitting, she should choose a new point and skedaddle towards it. And she has to realize that she is no longer sitting, but running, and perform everything necessary to be running.

Finally, the cat is supposed to know that the number of steps made this time increases according to how far she has traveled, given her current moving speed.

Anatoly Zenkov worked 24/7 to make interactive apartment plans for Unifomstroy’s Green House complex website.

As to the cat’s reactions, they are based on Pythagorean theorem—taking fright of the mouse the cat runs away from it.

The doors are also cursor sensitive and open when the cursor is brought closer.