chore: initial commit
This commit is contained in:
commit
a52c90d10b
8 files changed
+182
No files matched your search
@@ -0,0 +1,24 @@
|
||||
use std::{collections::HashMap, num::NonZeroU8};
|
||||
|
||||
use crate::tape::{Tape, TapeSymbol};
|
||||
|
||||
struct TuringMachine {
|
||||
state_table: HashMap<(MachineState, TapeSymbol), MachineAction>,
|
||||
tape: Tape,
|
||||
}
|
||||
|
||||
enum MachineState {
|
||||
Halt,
|
||||
StateNumber(NonZeroU8),
|
||||
}
|
||||
|
||||
struct MachineAction {
|
||||
tape_write: TapeSymbol,
|
||||
movement: MachineMovement,
|
||||
new_state: MachineState,
|
||||
}
|
||||
|
||||
enum MachineMovement {
|
||||
Left,
|
||||
Right,
|
||||
}
|
||||
Reference in new issue
Block a user