A Rust-based logic gate simulation game where users can combine basic logic gates to create complex circuits and obtain the desired outputs. The game simulates the logic gates' behavior over clock cycles.
- Basic logic gates: AND, OR, NOT...
- Circuit creation with multiple gates and inputs.
- Simulation over clock cycles to evaluate circuit outputs.
- Easy-to-extend for additional gate types and features.
- Endless possibilities
-
Clone the repository:
git clone https://github.com/pushkar-dev/logic-gate-game.git cd logic-gate-game -
Build the project:
Make sure you have Rust installed.
cargo build --release
-
Run the simulation:
cargo run
src/main.rs: The main entry point of the application. Contains the setup and execution of the circuit simulation.src/gates/logic_gate.rs: Contains the definition and implementation of theLogicGateenum.- and
src/gates/circuit.rscontainsCircuitstruct, which has methods to create circuits and run simulation for a given number of clock cycles. resources/config.tomlcontains configuration for the window of the simulation.src/frontendcontains logic to draw the game state.
Contributions are welcome! Please feel free to submit a pull request or open an issue for any bug reports or feature requests.
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature). - Commit your changes (
git commit -am 'Add some feature'). - Push to the branch (
git push origin feature/your-feature). - Create a new Pull Request.
- Create branch evaluation logic
- Make branch evaluation logic to be computed parallel
-
Create methods for merging branches(Cancelled) -
Code multiple branch evaluation logic(Cancelled) - List a new syntax for building and defining circuits
- Create GUI for interaction (In Progress)
- Create level design
- Rust Programming Language
- Inspired by "computer engineering for babies"
