Skip to content

pushkar-dev/logic-gate-game

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Logic Gate Simulation Game

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.

Features

  • 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

Installation

  1. Clone the repository:

    git clone https://github.com/pushkar-dev/logic-gate-game.git
    cd logic-gate-game
  2. Build the project:

    Make sure you have Rust installed.

    cargo build --release

Usage

  1. Run the simulation:

    cargo run

Idea

alt text

Project Structure

  • 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 the LogicGate enum.
  • and src/gates/circuit.rs contains Circuit struct, which has methods to create circuits and run simulation for a given number of clock cycles.
  • resources/config.toml contains configuration for the window of the simulation.
  • src/frontend contains logic to draw the game state.

Contributing

Contributions are welcome! Please feel free to submit a pull request or open an issue for any bug reports or feature requests.

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/your-feature).
  3. Commit your changes (git commit -am 'Add some feature').
  4. Push to the branch (git push origin feature/your-feature).
  5. Create a new Pull Request.

TODO:

  • 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

Acknowledgments

About

logic gate game made in rust

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages