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

Method __init__

projects/Neurons/main.py:41–43  ·  view source on GitHub ↗

Initialise the grid with empty cells.

(self, width, height)

Source from the content-addressed store, hash-verified

39 """Class to store grid."""
40
41 def __init__(self, width, height) -> None:
42 """Initialise the grid with empty cells."""
43 self._grid = [[Empty() for _ in range(width)] for _ in range(height)]
44
45 def __str__(self) -> str:
46 """Return the string representation of the grid."""

Callers

nothing calls this directly

Calls 1

EmptyClass · 0.70

Tested by

no test coverage detected