Exemplo n.º 1
0
 def test_clear_full_rows_with_one_full_row(self):
     board = Board(20, 40)
     board.rows[0] = [1]*20
     count = board.clear_full_rows()
     self.assertEqual(count, 1)
     count = board.clear_full_rows()
     self.assertEqual(count, 0)
Exemplo n.º 2
0
 def test_clear_full_rows_with_three_full_rows(self):
     board = Board(20, 40)
     board.rows[0] = [1] * 20
     board.rows[10] = [1] * 20
     board.rows[35] = [1] * 20
     board.rows[30] = [1, None] * 10
     count = board.clear_full_rows()
     self.assertEqual(count, 3)
Exemplo n.º 3
0
 def test_clear_full_rows_with_no_full_rows(self):
     board = Board(20, 40)
     count = board.clear_full_rows()
     self.assertEqual(count, 0)