MCPcopy Create free account
hub / github.com/Mrinank-Bhowmick/python-beginner-projects / main

Function main

projects/Neurons/main.py:88–98  ·  view source on GitHub ↗

Run the program with two example Neurons.

()

Source from the content-addressed store, hash-verified

86
87
88def 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
101if __name__ == "__main__":

Callers 1

main.pyFile · 0.70

Calls 3

set_neuronMethod · 0.95
tickMethod · 0.95
GridClass · 0.70

Tested by

no test coverage detected