(self, height, width)
| 119 | |
| 120 | class Grid: |
| 121 | def __init__(self, height, width): |
| 122 | self.height = height |
| 123 | self.width = width |
| 124 | self.rows = [] |
| 125 | for _ in range(self.height): |
| 126 | self.rows.append([EMPTY] * self.width) |
| 127 | |
| 128 | def get(self, y, x): |
| 129 | return self.rows[y % self.height][x % self.width] |