(self)
| 132 | self.rows[y % self.height][x % self.width] = state |
| 133 | |
| 134 | def __str__(self): |
| 135 | output = "" |
| 136 | for row in self.rows: |
| 137 | for cell in row: |
| 138 | output += cell |
| 139 | output += "\n" |
| 140 | return output |
| 141 | |
| 142 | |
| 143 | def count_neighbors(y, x, get_cell): |