diff --git a/Set-Algebra/Complement.png b/Set-Algebra/Complement.png new file mode 100644 index 0000000..987eced Binary files /dev/null and b/Set-Algebra/Complement.png differ diff --git a/Set-Algebra/Intersection.png b/Set-Algebra/Intersection.png new file mode 100644 index 0000000..1922d43 Binary files /dev/null and b/Set-Algebra/Intersection.png differ diff --git a/Set-Algebra/Substraction.png b/Set-Algebra/Substraction.png new file mode 100644 index 0000000..0c45419 Binary files /dev/null and b/Set-Algebra/Substraction.png differ diff --git a/Set-Algebra/Union.png b/Set-Algebra/Union.png new file mode 100644 index 0000000..37c375e Binary files /dev/null and b/Set-Algebra/Union.png differ diff --git a/Set-Algebra/script.js b/Set-Algebra/script.js index 204ac11..b13cfa8 100644 --- a/Set-Algebra/script.js +++ b/Set-Algebra/script.js @@ -303,21 +303,26 @@ function printStep(operation, firstSet, secondSet, result) { step++; let str = ''; + let img = ""; switch (operation) { case '!': str = `!${setToString(firstSet)} = ${setToString(result)}`; + img = "Complement.png"; break; case '/': str = `${setToString(firstSet)} / ${setToString(secondSet)} = ${setToString(result)}`; + img = "Intersection.png"; break; case '+': str = `${setToString(firstSet)} + ${setToString(secondSet)} = ${setToString(result)}`; + img = "Union.png"; break; case '-': str = `${setToString(firstSet)} - ${setToString(secondSet)} = ${setToString(result)}`; + img = "Substraction.png"; break; default: @@ -328,6 +333,7 @@ function printStep(operation, firstSet, secondSet, result) { steps.insertAdjacentHTML('beforeend', `