This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Board: | |
| def __init__(self, size, space=None): | |
| self.cells = [[space] * size for i in range(size)] | |
| self.space = space | |
| def __iter__(self): | |
| return (tuple(row) for row in self.cells) | |
| def __getitem__(self, pos): |