public function __construct($seed = null)
 {
     if ($seed === null) {
         $seed = time();
     }
     srand($seed);
     $cap_e = new Tile("cap-e.png", array("N" => false, "W" => false, "S" => false, "E" => true));
     $this->pipes[] = $cap_e;
     $cap_n = new Tile("cap-n.png", array("N" => true, "W" => false, "S" => false, "E" => false));
     $this->pipes[] = $cap_n;
     $cap_s = new Tile("cap-s.png", array("N" => false, "W" => false, "S" => true, "E" => false));
     $this->pipes[] = $cap_s;
     $cap_w = new Tile("cap-w.png", array("N" => false, "W" => true, "S" => false, "E" => false));
     $this->pipes[] = $cap_w;
     $ninety_es = new Tile("ninety-es.png", array("N" => false, "W" => false, "S" => true, "E" => true));
     $this->pipes[] = $ninety_es;
     $ninety_ne = new Tile("ninety-ne.png", array("N" => true, "W" => false, "S" => false, "E" => true));
     $this->pipes[] = $ninety_ne;
     $ninety_sw = new Tile("ninety-sw.png", array("N" => false, "W" => true, "S" => true, "E" => false));
     $this->pipes[] = $ninety_sw;
     $ninety_wn = new Tile("ninety-wn.png", array("N" => true, "W" => true, "S" => false, "E" => false));
     $this->pipes[] = $ninety_wn;
     $straight_h = new Tile("straight-h.png", array("N" => false, "W" => true, "S" => false, "E" => true));
     $this->pipes[] = $straight_h;
     $straight_v = new Tile("straight-v.png", array("N" => true, "W" => false, "S" => true, "E" => false));
     $this->pipes[] = $straight_v;
     $tee_esw = new Tile("tee-esw.png", array("N" => false, "W" => true, "S" => true, "E" => true));
     $this->pipes[] = $tee_esw;
     $tee_nes = new Tile("tee-nes.png", array("N" => true, "W" => false, "S" => true, "E" => true));
     $this->pipes[] = $tee_nes;
     $tee_swn = new Tile("tee-swn.png", array("N" => true, "W" => true, "S" => true, "E" => false));
     $this->pipes[] = $tee_swn;
     $tee_wne = new Tile("tee-wne.png", array("N" => true, "W" => true, "S" => false, "E" => true));
     $this->pipes[] = $tee_wne;
     $cap_e->setRotation($cap_n);
     $cap_n->setRotation($cap_s);
     $cap_s->setRotation($cap_w);
     $cap_w->setRotation($cap_e);
     $ninety_es->setRotation($ninety_ne);
     $ninety_ne->setRotation($ninety_sw);
     $ninety_sw->setRotation($ninety_wn);
     $ninety_wn->setRotation($ninety_es);
     $straight_h->setRotation($straight_v);
     $straight_v->setRotation($straight_h);
     $tee_esw->setRotation($tee_nes);
     $tee_nes->setRotation($tee_swn);
     $tee_swn->setRotation($tee_wne);
     $tee_wne->setRotation($tee_esw);
     for ($i = 0; $i < 5; $i++) {
         $this->choices1[] = $this->getRandomPipe();
     }
     for ($i = 0; $i < 5; $i++) {
         $this->choices2[] = $this->getRandomPipe();
     }
 }