Trouble integrating switch into code

I have written a code that uses a light sensor to make LEDs flicker when the light is low. The code works just fine, but once I wrote a switch into it, it does absolutely nothing. If you can see what my issue is, I would be so happy!

Code that works:

/*
 * 
 *
 * 
 * 
 * 
 */
#include   <TrueRandom.h>    //Include the TrueRandom Library

int ledPin1 = 11;       //LED pin 11
int ledPin2 = 10;       //LED pin 10
int sensorPin = 0;	// light sensor is connected to analog pin 0
int sensorValue;	// variable to store the value coming from the sensor

void setup()	 
{	 
  pinMode(ledPin1, OUTPUT); //Sets the LED pins as output pins.
  pinMode(ledPin2, OUTPUT);
  digitalWrite(ledPin1, LOW);
  digitalWrite(ledPin2, LOW);	// LED is off
}	 


void loop()	// run over and over again
{
  sensorValue = analogRead(sensorPin);	// read the value from the sensor
          Serial.println(sensorValue);	// send that value to the computer
          delay(200);
if (sensorValue > 850) //if the light is greater than 850
{ 
 analogWrite(ledPin1, TrueRandom.random(0,255)); //Use the same pins used above
  analogWrite(ledPin2, TrueRandom.random(0,255));
  delay(TrueRandom.random(40,70)); //Limits the speed.
}
else
{
   analogWrite(ledPin1, 0);// turn LED OFF
  analogWrite(ledPin2, 0);// turn LED OFF
}

}

Code that doesn’t work:

/*

 * 
 * 
 */
#include   <TrueRandom.h>    //Include the TrueRandom Library

int ledPin1 = 11;       //Set LED pin
int ledPin2 = 10;       //Set LED pin
int sensorPin = 0;	// light sensor is connected to analog pin 0
int sensorValue;	// variable to store the value coming from the sensor
int switchPin = 2;	// switch connected to digital pin 2
int switchValue;	// a variable to keep track of when switch is pressed

void setup()	 
{	 
  pinMode(ledPin1, OUTPUT); //Sets the LED pins as output pins.
  pinMode(ledPin2, OUTPUT);
  digitalWrite(ledPin1, LOW);
  digitalWrite(ledPin2, LOW);	// LED is off
  pinMode(switchPin, INPUT);	// sets the switchPin to be an input
  digitalWrite(switchPin, LOW);	// sets the default switch to LOW
}	 


void loop()	// run over and over again
{


  switchValue = digitalRead(switchPin);	// check to see if the switch is pressed
  if (switchValue == HIGH) //switch is pressed
  {
    sensorValue = analogRead(sensorPin);	// read the value from the sensor
    Serial.println(sensorValue);	// send that value to the computer
    delay(200);
    if   (sensorValue > 850) //if the light is below 400
    { 
      analogWrite(ledPin1, TrueRandom.random(0,255)); //Use the same pins used above
      analogWrite(ledPin2, TrueRandom.random(0,255));
      delay(TrueRandom.random(40,70)); //Limits the speed.
    }
    else
    {
      analogWrite(ledPin1, 0);// turn LED OFF
      analogWrite(ledPin2, 0);// turn LED OFF
    }
  }

  else
  {      
    analogWrite(ledPin1, 0);// turn LED OFF
    analogWrite(ledPin2, 0);// turn LED OFF
  }

}

What am I doing wrong?

try those change…

#include   <TrueRandom.h>    //Include the TrueRandom Library

int ledPin1 = 11;       //Set LED pin
int ledPin2 = 10;       //Set LED pin
int sensorPin = 0;	// light sensor is connected to analog pin 0
int sensorValue;	// variable to store the value coming from the sensor
int switchPin = 2;	// switch connected to digital pin 2
int switchValue;	// a variable to keep track of when switch is pressed

void setup()	
{
  Serial.begin(9600); // you forgot that line to display to the computer	
  pinMode(ledPin1, OUTPUT); //Sets the LED pins as output pins.
  pinMode(ledPin2, OUTPUT);
  digitalWrite(ledPin1, LOW);
  digitalWrite(ledPin2, LOW);	// LED is off
  pinMode(switchPin, INPUT);	// sets the switchPin to be an input

  // you don't need that line
  // digitalWrite(switchPin, LOW);	// sets the default switch to LOW
  switchValue=0; // set the switch value to LOW <-- That you need
}	


void loop()	// run over and over again
{


  switchValue = digitalRead(switchPin);	// check to see if the switch is pressed
  delay(10); // a debounce time for the switch
  if (switchValue == HIGH) //switch is pressed
  {
    sensorValue = analogRead(sensorPin);	// read the value from the sensor
    Serial.println(sensorValue);	// send that value to the computer
    delay(200);
    if   (sensorValue > 850) //if the light is below 400
    { 
      analogWrite(ledPin1, TrueRandom.random(0,255)); //Use the same pins used above
      analogWrite(ledPin2, TrueRandom.random(0,255));
      delay(TrueRandom.random(40,70)); //Limits the speed.
    }
    else
    {
      analogWrite(ledPin1, 0);// turn LED OFF
      analogWrite(ledPin2, 0);// turn LED OFF
    }
  }

  else
  {      
    analogWrite(ledPin1, 0);// turn LED OFF
    analogWrite(ledPin2, 0);// turn LED OFF
  }

}

How do you wire up your switch? Do you have a pull up/down resistor?