for (int i = 0; i < TrafficGrid.EastCars.Length; i++) { if (TrafficGrid.EastCars[i] != null) { //Car going East Point cpt = new Point(tmp3, Convert.ToInt32(rect.Left + 370)); Point w1 = new Point(tmp3, Convert.ToInt32(rect.Left + 380)); Point w2 = new Point(tmp4, Convert.ToInt32(rect.Left + 380)); //tmp3 += increm; //tmp4 += increm; if (tmp3 == 370) { tmp3 = tmp3 + 210; tmp4 = tmp4 + 210; } drawCar(g, cpt, w1, w2, "East"); } tmp3 += increm; tmp4 += increm; }