def test4(self):
     b = _make_board(""".1.
                        211""")
     cell = boardgen._InsertCellChange
     col = boardgen._InsertColumnChange
     expChanges = [col(0, 1),
                   col(1, 1),
                   col(2, 1),
                   col(3, 1),
                   cell(0, 0),
                   cell(0, 1),
                   cell(1, 0),
                   cell(1, 1),
                   cell(1, 2),
                   cell(2, 0),
                   cell(2, 1)]
     changes = boardgen._enumerate_one_cell_changes(b, (10, 10))
     self._assertChanges(changes, expChanges)
Exemple #2
0
 def test4(self):
     b = _make_board(""".1.
                        211""")
     cell = boardgen._InsertCellChange
     col = boardgen._InsertColumnChange
     expChanges = [
         col(0, 1),
         col(1, 1),
         col(2, 1),
         col(3, 1),
         cell(0, 0),
         cell(0, 1),
         cell(1, 0),
         cell(1, 1),
         cell(1, 2),
         cell(2, 0),
         cell(2, 1)
     ]
     changes = boardgen._enumerate_one_cell_changes(b, (10, 10))
     self._assertChanges(changes, expChanges)
Exemple #3
0
 def test3(self):
     b = board.Board()
     expChanges = []
     changes = boardgen._enumerate_one_cell_changes(b, (1, 0))
     self._assertChanges(changes, expChanges)
Exemple #4
0
 def test1(self):
     b = board.Board()
     expChanges = [boardgen._InsertColumnChange(0, 1)]
     changes = boardgen._enumerate_one_cell_changes(b, (1, 1))
     self._assertChanges(changes, expChanges)
 def test3(self):
     b = board.Board()
     expChanges = []
     changes = boardgen._enumerate_one_cell_changes(b, (1, 0))
     self._assertChanges(changes, expChanges)
 def test1(self):
     b = board.Board()
     expChanges = [boardgen._InsertColumnChange(0, 1)]
     changes = boardgen._enumerate_one_cell_changes(b, (1, 1))
     self._assertChanges(changes, expChanges)