Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/turmite animation #18

Merged
merged 2 commits into from
May 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions src/pyturmite/configs/turmites/turmite.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
n_steps: 20000
n_steps: 10000
ruleset: "stateful" # 'classic' or 'stateful'
instructions: [ # triplet notation (write colour, turn instruction, next state)
[(1, 'R', 0),(1, 'R', 1)], # one state per row, one colour per tuple
[(0, 'N', 0),(0, 'N', 1)],
]
instructions: # triplet notation (write colour, turn instruction, next state),
[ # one state per row, one colour per tuple
[
[1, 'R', 0],[1, 'R', 1],
],
[
[0, 'N', 0],[0, 'N', 1],
],
]
2 changes: 0 additions & 2 deletions src/pyturmite/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ def main():
config = Config()
config.load()

print(config)

if config.ruleset == "classic":
turmite = ClassicTurmite()
elif config.ruleset == "stateful":
Expand Down
1 change: 0 additions & 1 deletion src/pyturmite/turmites.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ def turn(self, colour, state):
# change colour
colour_to_write = int(colour_state_tuple[0])
self.grid[self.x, self.y] = colour_to_write
print(colour, state, colour_state_tuple, colour_to_write, self.state)
# move instruction
instruction = colour_state_tuple[1]
self.instruction_to_func(instruction)()
Expand Down
Loading