(self, height, width)
| 55 | |
| 56 | class Grid: |
| 57 | def __init__(self, height, width): |
| 58 | self.height = height |
| 59 | self.width = width |
| 60 | self.rows = [] |
| 61 | for _ in range(self.height): |
| 62 | self.rows.append([EMPTY] * self.width) |
| 63 | |
| 64 | def get(self, y, x): |
| 65 | return self.rows[y % self.height][x % self.width] |