@Override
	public void delete() {
		Wire start = this.getStartPiece();
		Wire end = this.getEndPiece();

		if (end.potential != null) {
			end.potential.delete();
			this.circuit.getSimulation().addEvent(end.potential.getNode1(), 0);
			this.circuit.getSimulation().addEvent(end.potential.getNode2(), 0);
		}

		Board board1 = this.circuit.getBoardAt(start.getStartX(), start.getStartY());
		Board board2 = this.circuit.getBoardAt(end.getEndX(), end.getEndY());

		if (board1 != board2) {
			if (board1 != null) {
				board1.interwires.remove(end);
			}
			if (board2 != null) {
				board2.interwires.remove(end);
			}
		}

		if (board2 != null) {
			board2.wires.remove(end);
		}

		while (start != null) {
			this.circuit.remove(start);
			start = start.next;
		}
		this.circuit.repaint();
	}