+ int cant_in = 0, cant_out =0;
+ t_logic_connector temp;
+ std::list<t_line>::iterator i = workplace->lista_lineas_in.begin();
+ while ( i != workplace->lista_lineas_in.end() ) {
+ if ( (*i).logic->get_id() == ID ) {
+ temp.type = OUT;
+ temp.name_dest = (*i).store->get_name();
+ vec_connector.push_back(temp);
+ cant_out++;
+ }
+ i++;
+ }
+
+ i = workplace->lista_lineas_out.begin();
+ while ( i != workplace->lista_lineas_out.end() ) {
+ if ( (*i).logic->get_id() == ID ) {
+ temp.type = IN;
+ temp.name_dest = (*i).store->get_name();
+ vec_connector.push_back(temp);
+ cant_in++;
+ }
+ i++;
+ }
+
+ //FIXME la or tiene n entradas y una salida!!!!!!!!!!!!!!!!!!
+ return true;// (cant_in == cant_out );
+}
+
+ConnectorType Or::detect_click_position(int _a, int _b)
+{
+ switch (imgActual) {
+ case 0:
+ if ( (_a<=32 )&&(_a>=22)&&(_b<=20)&&(_b>=10) )
+ return OUT;
+ if ( (_a<=10)&&(_a>=0)&&(_b<=20)&&(_b>=10) )
+ return IN;
+ break;
+ case 1:
+ if ( (_a<=20 )&&(_a>=10)&&(_b<=32)&&(_b>=22) )
+ return OUT;
+ if ( (_a<=20)&&(_a>=10)&&(_b<=10)&&(_b>=0) )
+ return IN;
+ break;
+ case 2:
+ if ( (_a<=10 )&&(_a>=0)&&(_b<=20)&&(_b>=10) )
+ return OUT;
+ if ( (_a<=32)&&(_a>=22)&&(_b<=20)&&(_b>=10) )
+ return IN;
+ break;
+ case 3:
+ if ( (_a<=20 )&&(_a>=10)&&(_b<=10)&&(_b>=0) )
+ return OUT;
+ if ( (_a<=20)&&(_a>=10)&&(_b<=32)&&(_b>=22) )
+ return IN;
+ }
+ return UNDEF;
+}
+
+void Or::update_logic_position()
+{
+ switch (imgActual) {
+ case 0:
+ in_x = x;
+ in_y = y+16;
+ out_x = x+32;
+ out_y = y+16;
+ break;
+ case 1:
+ in_x = x+16;
+ in_y = y;
+ out_x = x+16;
+ out_y = y+32;
+ break;
+ case 2:
+ in_x = x+32;
+ in_y = y+16;
+ out_x = x;
+ out_y = y+16;
+ break;
+ case 3:
+ in_x = x+16;
+ in_y = y+32;
+ out_x = x+16;
+ out_y = y;
+ }
+}
+
+void Or::get_in_logic_connect_position(int& _a, int& _b)
+{
+ _a = in_x;
+ _b = in_y;
+}
+
+void Or::get_out_logic_connect_position(int& _a, int& _b)
+{
+ _a =out_x;
+ _b =out_y;