Condensing Code

i need to do that with servos,

Do what exactly ?

Servos move to the position they are commanded to go to. This is normally 0 to 180 degrees but be cautious as not all servos can move 180 degrees. Be careful too that you buy servos and not continuous rotation "servos" which are not the same thing at all. To make your bot move you will need to command several servos to move to precise positions at the same time.

Be aware that this is not a trivial project that you are embarking on. The best thing that you could do is to work through the examples in the IDE. Which Arduino board do you have ? What power source will you be using for the servos ?