Skip to content

Latest commit

 

History

History
83 lines (66 loc) · 2.38 KB

README.md

File metadata and controls

83 lines (66 loc) · 2.38 KB

Arrows

About

Arrows is a celluar automata

Arrows Demo

How to use

There are two sides of the program. The largest dependency is ggez, which provides window and graphics management. Python talks to Rust through a C interface, where ccfi is needed for this to occur.

Python ">3.0" ccfi ">1.13"

Rust "2018 Edition" ggez = "0.5.1" rand = "0.7" mint = "0.5" cgmath = { version = "0.17", features = ["mint"]}

Aditional Dependecies libudev-dev libasound2-dev

Build and run the program through makefile

make run

How it works

Rust includes all of the logic and graphics. Where a "Board" object can be seny to rust and displayed and run. The python code contains is higher level drafter, where more complex boards can be designed. Right now in the drafter, there is a topological function to arrange sub-blocks and a basic router for wires using breadth first search. Improving this drafter is an interesting challenge as wires cannot cross, making interesting router challenges.

Code Structure

src
├── bridge_python_side
│   ├── adapter.py
│   └── comm.py
├── bridge_rust_side
│   ├── Cargo.toml
│   └── src
│       └── lib.rs
├── draft
│   ├── app.py
│   ├── defaults
│   │   └── defaults.py
│   ├── maker
│   │   ├── connector.py
│   │   ├── form.py
│   │   ├── raster.py
│   │   └── topological_sort.py
│   └── model
│       ├── block.py
│       └── section.py
├── logic
│   ├── Cargo.toml
│   └── src
│       ├── block.rs
│       ├── board.rs
│       ├── lib.rs
│       └── pos.rs
└── view
    ├── Cargo.toml
    ├── resources
    │   ├── arrow_down_active.png
    │   ├── arrow_down_inactive.png
    │   ├── arrow_left_active.png
    │   ├── arrow_left_inactive.png
    │   ├── arrow_right_active.png
    │   ├── arrow_right_inactive.png
    │   ├── arrow_up_active.png
    │   └── ...
    └── src
        ├── assets.rs
        └── lib.rs