Line Follower Complications

You are correct I don't mean adding physical memory. I mean getting your sketch to remember what it did last, at the moment it only lives in the present.

Imagine you are the line follower. You look at the sensors and they say BLACK WHITE what are you going to do?
To make a good decision you really need more information like I see BLACK WHITE now but just before that I was seeing BLACK BLACK for 10s and going at full speed.

A couple of other things about your program. The funtion loop() does what it says it loops it is called again and again.
Within loop() you have a never ending while statment

while(1)
{
...
}

Get rid of that while statement and let loop() do the looping for you.

You will need to move the stuff that only needs to get done once out of loop() and into setup()
i.e. move this stuff;

while(analogRead(light) < 800)
  {
    Serial.print("Sensor light = ");
    Serial.print(analogRead(light));
    Serial.print(" Sensor line = ");
    Serial.print(digitalRead(line));
    Serial.print(" Sensor line2 = ");
    Serial.println(digitalRead(line2));
  }
  velLEFT(255);
  velRIGHT(255);
  delay(600);

You can use the millis() fuction to work out how long you have been doing something;