Merge pull request #4 from Maks1mS/dev

Dev
This commit is contained in:
Maxim Slipenko 2021-09-28 10:05:54 +03:00 committed by GitHub
commit 601219eeeb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,8 +20,8 @@ def from_file(filename: str):
if not action: if not action:
continue continue
new_symbol, direction, new_state = re.split('([<|>|.])', action) new_symbol, direction, *new_state = action
new_state = int(new_state) - 1 new_state = int(''.join(new_state)) - 1
movement = { movement = {
'>': Movemement.R, '>': Movemement.R,
@ -31,8 +31,6 @@ def from_file(filename: str):
program.set(i, symbol, Action(new_state, new_symbol, movement)) program.set(i, symbol, Action(new_state, new_symbol, movement))
# program[symbol][i] = ([new_symbol, direction, new_state])
f.close() f.close()
return program return program