From 52d39d2eafc4acf3aedb10cc51e764ae4b4999e4 Mon Sep 17 00:00:00 2001 From: Timo Schneider Date: Thu, 21 Mar 2024 16:12:55 +0100 Subject: [PATCH] Added README --- README | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 README diff --git a/README b/README new file mode 100644 index 0000000..d8b9d71 --- /dev/null +++ b/README @@ -0,0 +1,31 @@ +# Turing Machine + +## What is a Turing Machine? +https://en.wikipedia.org/wiki/Turing_machine + +## How to use +(1) Create a new touring mashine +```rust +let turing_machine: TuringMachine = TuringMachine::new(); +``` + +(2) Configure the belt +```rust +turing_machine.set_belt(index: usize, value: Value); +``` + +(3) Configure the state machine + (3.1) Set the transitions +```rust +turing_machine.set_transition(state: u64, trigger: Value, next_state: u64); +``` + + (3.1) Set the actions +```rust +turing_machine.set_action(state: u64, trigger: Value, action: Action); +``` + +(4) Run the machine +```rust +turing_machine.start(); +```