if (name.equals(CIRCUIT_CONNECTOR)) {
res = new CircuitConnection(x, y, width, height);
} else if (name.equals(EMITTER)) {
res = new Emitter(x, y, width, height);
} else if (name.equals(RECEIVER)) {
res = new Receiver(x, y, width, height);
} else if (name.equals(SWITCH_BOX_2_POS)) {