Wave 2 Beta Release

 Wave 2 Beta Release: New Logic Gates, Improved UX, and Major Enhancements! 

---

## **🆕 New Features**
### **1️⃣ Additional Logic Gates**
#### **🔲 NAND Gate**
- **Fully functional NAND logic** implemented.
- **Truth Table**:
  | **Input A** | **Input B** | **Output (A NAND B)** |
  |-------------|-------------|-----------------------|
  | 0           | 0           | **1** (ON)            |
  | 0           | 1           | **1** (ON)            |
  | 1           | 0           | **1** (ON)            |
  | 1           | 1           | **0** (OFF)           |
- **Toggle buttons** for Input 1 and Input 2 work as expected.
- Lightbulb updates correctly to match the logic output.

#### **🔲 NOR Gate**
- **Fully functional NOR logic** implemented.
- **Truth Table**:
  | **Input A** | **Input B** | **Output (A NOR B)** |
  |-------------|-------------|----------------------|
  | 0           | 0           | **1** (ON)           |
  | 0           | 1           | **0** (OFF)          |
  | 1           | 0           | **0** (OFF)          |
  | 1           | 1           | **0** (OFF)          |
- Lightbulb updates correctly to match the logic output.
- Toggle buttons for Input 1 and Input 2 work as expected.

#### **🔲 XOR Gate**
- **Fully functional XOR logic** implemented.
- **Truth Table**:
  | **Input A** | **Input B** | **Output (A XOR B)** |
  |-------------|-------------|----------------------|
  | 0           | 0           | **0** (OFF)          |
  | 0           | 1           | **1** (ON)           |
  | 1           | 0           | **1** (ON)           |
  | 1           | 1           | **0** (OFF)          |
- Toggle buttons for Input 1 and Input 2 trigger the logic updates.
- Lightbulb behavior reflects the XOR output logic.

#### **🔲 XNOR Gate**
- **Fully functional XNOR logic** implemented.
- **Truth Table**:
  | **Input A** | **Input B** | **Output (A XNOR B)** |
  |-------------|-------------|-----------------------|
  | 0           | 0           | **1** (ON)            |
  | 0           | 1           | **0** (OFF)           |
  | 1           | 0           | **0** (OFF)           |
  | 1           | 1           | **1** (ON)            |
- Lightbulb updates correctly based on the logic.
- Input toggle buttons work correctly for Input 1 and Input 2.

---

## **🛠️ Enhancements & Improvements**
- **Input Handling**:
  - **Input toggles** now work consistently across all logic gate types (AND, OR, NOT, XOR, NOR, NAND, XNOR).
  - Input logic is consistent across all gate types, including the lightbulb status updates.

- **Reset Functionality**:
  - The **reset button** now works across all logic gates.
  - The lightbulb and toggle button status are properly reset.

- **Code Refactoring**:
  - Reduced **redundancy** in the toggle input functions.
  - Enhanced **code readability** and maintainability.
  - Removed unnecessary logic duplications and consolidated shared logic for gate input handling.

---

## **🐛 Bug Fixes**
- **Fixed NAND Gate logic** — lightbulb now correctly updates according to the truth table.
- **Fixed XNOR Gate logic** — logic now correctly handles the logic for matching inputs.
- **Fixed Reset Functionality** — lightbulbs and buttons now reset correctly across all gate types.
- **General Bug Fixes** — Minor improvements in input toggle functions for better user experience.

---

## **📁 Files Changed**
📄 logicGates.js 📄 logicGates.html

---

## **🚀 Release Notes**
This release marks the **Wave 2 Beta** of the CS:Box project, bringing support for all fundamental logic gates. This wave includes the **NAND, NOR, XOR, and XNOR gates**, which have been built with consistent logic, responsive lightbulb behavior, and proper input handling. This release also introduces major fixes to the **reset functionality**, ensuring that all gates reset properly when the reset button is pressed.

**New Features Include:**
- Full support for **NAND, NOR, XOR, XNOR logic gates**.
- Input toggle buttons now work seamlessly for all gates.
- Lightbulb status updates in real-time according to input changes.
- **Reset button** now clears all input states and correctly resets the lightbulb status for each gate type.

**Looking Ahead**:
- Further UI improvements to make the interface more user-friendly.
- Expanded testing to ensure accurate logic across all devices.

Enjoy this latest version of CS:Box! 🚀
This commit is contained in:
2024-12-07 23:46:18 +00:00
parent a247bc036e
commit d4441afd55
18 changed files with 1180 additions and 188 deletions

View File

@@ -1,6 +1,6 @@
@font-face {
font-family: 'Open Sans';
src: url(/assets/fonts/Open%20Sans-95e85857855fec865b6c71369458c398.woff2?h=b35fe44580a9487b7d79edaefb010eea) format('woff2');
src: url(/assets/fonts/Open%20Sans-95e85857855fec865b6c71369458c398.woff2?h=4afd515aa4663edcfb6121d868bc7f5a) format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
@@ -9,7 +9,7 @@
@font-face {
font-family: 'Open Sans';
src: url(/assets/fonts/Open%20Sans-aaa666d4a428e7251998747fecc78290.woff2?h=b35fe44580a9487b7d79edaefb010eea) format('woff2');
src: url(/assets/fonts/Open%20Sans-aaa666d4a428e7251998747fecc78290.woff2?h=4afd515aa4663edcfb6121d868bc7f5a) format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
@@ -18,7 +18,7 @@
@font-face {
font-family: 'Open Sans';
src: url(/assets/fonts/Open%20Sans-78b0a85baaa30f24beb648328eafa7d2.woff2?h=b35fe44580a9487b7d79edaefb010eea) format('woff2');
src: url(/assets/fonts/Open%20Sans-78b0a85baaa30f24beb648328eafa7d2.woff2?h=4afd515aa4663edcfb6121d868bc7f5a) format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
@@ -27,7 +27,7 @@
@font-face {
font-family: 'Open Sans';
src: url(/assets/fonts/Open%20Sans-61d49d1448f17f5c304c64dcd7e21de6.woff2?h=b35fe44580a9487b7d79edaefb010eea) format('woff2');
src: url(/assets/fonts/Open%20Sans-61d49d1448f17f5c304c64dcd7e21de6.woff2?h=4afd515aa4663edcfb6121d868bc7f5a) format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
@@ -36,7 +36,7 @@
@font-face {
font-family: 'Open Sans';
src: url(/assets/fonts/Open%20Sans-b97d58e7110272ce3bd9c10ea779a9f2.woff2?h=b35fe44580a9487b7d79edaefb010eea) format('woff2');
src: url(/assets/fonts/Open%20Sans-b97d58e7110272ce3bd9c10ea779a9f2.woff2?h=4afd515aa4663edcfb6121d868bc7f5a) format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
@@ -45,7 +45,7 @@
@font-face {
font-family: 'Open Sans';
src: url(/assets/fonts/Open%20Sans-75740ec0c715f6b2a4a5d6d5224b0913.woff2?h=b35fe44580a9487b7d79edaefb010eea) format('woff2');
src: url(/assets/fonts/Open%20Sans-75740ec0c715f6b2a4a5d6d5224b0913.woff2?h=4afd515aa4663edcfb6121d868bc7f5a) format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
@@ -54,7 +54,7 @@
@font-face {
font-family: 'Open Sans';
src: url(/assets/fonts/Open%20Sans-a6b0039aa2236f69d4b63042a8f3769a.woff2?h=b35fe44580a9487b7d79edaefb010eea) format('woff2');
src: url(/assets/fonts/Open%20Sans-a6b0039aa2236f69d4b63042a8f3769a.woff2?h=4afd515aa4663edcfb6121d868bc7f5a) format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
@@ -63,7 +63,7 @@
@font-face {
font-family: 'Open Sans';
src: url(/assets/fonts/Open%20Sans-8c179a95e52d0e855e33be00ed141e46.woff2?h=b35fe44580a9487b7d79edaefb010eea) format('woff2');
src: url(/assets/fonts/Open%20Sans-8c179a95e52d0e855e33be00ed141e46.woff2?h=4afd515aa4663edcfb6121d868bc7f5a) format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
@@ -72,7 +72,7 @@
@font-face {
font-family: 'Open Sans';
src: url(/assets/fonts/Open%20Sans-f020d8a91fea76d306428e8877dcc7d6.woff2?h=b35fe44580a9487b7d79edaefb010eea) format('woff2');
src: url(/assets/fonts/Open%20Sans-f020d8a91fea76d306428e8877dcc7d6.woff2?h=4afd515aa4663edcfb6121d868bc7f5a) format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;
@@ -81,7 +81,7 @@
@font-face {
font-family: 'Open Sans';
src: url(/assets/fonts/Open%20Sans-34eb5b5918b88fb910da76a70e512615.woff2?h=b35fe44580a9487b7d79edaefb010eea) format('woff2');
src: url(/assets/fonts/Open%20Sans-34eb5b5918b88fb910da76a70e512615.woff2?h=4afd515aa4663edcfb6121d868bc7f5a) format('woff2');
font-weight: 400;
font-style: normal;
font-display: swap;