Get SFML.
$ sudo apt install libsfml-dev
Clone the repository and build the source
$ git clone https://github.com/nodatapoints/wire
$ cd wire
/wire $ make
/wire $ ./wire
A minimalistic cellular automaton capable of simulating logic circuits.
In an infinite grid of square cells, there are for states:
- Empty
- Wire
- Blocking
- Active
At each point in time, every cell is in exactly one state. As time progresses, the states change from one generation to the next.
All cells change simultaneously according to the following rules:
In the next generation, a cell will change to state
- ... Empty if it is Empty
- ... Wire if it is Blocking
- ... Blocking if it is Active
- ... Active if it is Wire and it has an odd number of active neighbors with a shared edge.
There are two modes:
- The Edit Mode allows you to edit cells while time is halted. You will start in this mode.
- The Run Mode allows you to simulate what you've built.
The gray square is your cursor. On left click, you will set a wire at the cursor position. On right click you will delete it. Pressing Shift while clicking left will set an active cell.
When holding Ctrl, you can make a rectangular selection. Clicking will set the whole selection like it would with a single cell.
Pressing X cuts the current selection, C copies it. You will see the selection hover and move with the cursor. Pressing V pastes the clipboard at the current position.
Once you're done, Esc will cancel pasting.
When pressing Space, the simulation will start running. It can be paused and continued with P. When paused, you can run it step by step using S.
To start in paused, press S instead of Space.
To exit the Run Mode, press Space or Escape again. Otherwise it will exit automatically once there are no active cells present.
After exiting, the state before running will be resumed.
To exit the game, press Q