Run the program with two example Neurons.
()
| 86 | |
| 87 | |
| 88 | def main() -> None: |
| 89 | """Run the program with two example Neurons.""" |
| 90 | # Set the grid size proportional to the terminal |
| 91 | width, height = get_terminal_size() |
| 92 | grid = Grid(width // len(Neuron.CHAR), height) |
| 93 | grid.set_neuron(15, 15) # Example placement |
| 94 | grid.set_neuron(35, 35) |
| 95 | while grid.neurons: |
| 96 | print(grid) # Output the string representation of the grid |
| 97 | grid.tick() |
| 98 | time.sleep(1 / TICKS_PER_SECOND) |
| 99 | |
| 100 | |
| 101 | if __name__ == "__main__": |
no test coverage detected