fixed README
This commit is contained in:
12
README.md
12
README.md
@@ -4,28 +4,28 @@
|
|||||||
https://en.wikipedia.org/wiki/Turing_machine
|
https://en.wikipedia.org/wiki/Turing_machine
|
||||||
|
|
||||||
## How to use
|
## How to use
|
||||||
(1) Create a new touring mashine
|
### (1) Create a new touring mashine
|
||||||
```rust
|
```rust
|
||||||
let turing_machine: TuringMachine = TuringMachine::new();
|
let turing_machine: TuringMachine = TuringMachine::new();
|
||||||
```
|
```
|
||||||
|
|
||||||
(2) Configure the belt
|
### (2) Configure the belt
|
||||||
```rust
|
```rust
|
||||||
turing_machine.set_belt(index: usize, value: Value);
|
turing_machine.set_belt(index: usize, value: Value);
|
||||||
```
|
```
|
||||||
|
|
||||||
(3) Configure the state machine
|
### (3) Configure the state machine
|
||||||
(3.1) Set the transitions
|
#### (3.1) Set the transitions
|
||||||
```rust
|
```rust
|
||||||
turing_machine.set_transition(state: u64, trigger: Value, next_state: u64);
|
turing_machine.set_transition(state: u64, trigger: Value, next_state: u64);
|
||||||
```
|
```
|
||||||
|
|
||||||
(3.1) Set the actions
|
#### (3.1) Set the actions
|
||||||
```rust
|
```rust
|
||||||
turing_machine.set_action(state: u64, trigger: Value, action: Action);
|
turing_machine.set_action(state: u64, trigger: Value, action: Action);
|
||||||
```
|
```
|
||||||
|
|
||||||
(4) Run the machine
|
### (4) Run the machine
|
||||||
```rust
|
```rust
|
||||||
turing_machine.start();
|
turing_machine.start();
|
||||||
```
|
```
|
||||||
|
|||||||
Reference in New Issue
Block a user