I am participating in a national robotics competition called "National Robosprint Pakistan". I have designed a robot which can move forward, backward and change its angle where it is facing. Actually, it's an image guided robot, so I have to do image processing for it. For that purpose I have designed a simulator called "Virtual Arena", and it does all the things which a robot does and behaves likes the real arena of the competition.

Green colored circle is robot's destination, blue colored square is an object which the robot has to pick and the red colored boxes are hurdles. So far, I am successful enough to make a simulator which captures the current frame of the program and feeds that frame to an image processing program and run some algorithms on it and draw lines between robot, destinations and hurdles.
I can turn the face of robot left or right by specified amount of degrees by pressing arrow keys, but what is want is that when I would press up arrow, then the robot should go forward in the direction where it's head is facing. Right now it what it's doing is decrement y value of the robot so it looks like going upward when I press UP key, but What I want is that when I press Up key and robot is facing 45 degrees then it should go diagonally upward.
I have a variable called "deg" which stores the current degrees of rotation of the robot in order to draw rotated image of robot on screen. I used y=mx+b where m = tan(deg), but how to find b. I think to apply y = mx+b, I should have two point, but I have only one.
Please help.
If the robot's "heading angle" is $\theta$, then its direction of motion should be along the vector $(\cos\theta, \sin\theta)$.
So, if the robot is currently at the point $(x_0,y_0)$, and you want to move it by a distance $d$, its new position should be at the point $(x,y) = (x_0 + d*\cos\theta, y_0 + d*\sin\theta)$