Ejemplo n.º 1
0
 def test_move_up_when_has_merge_but_not_together_then_merged(self):
     g = TwoThousandFortyEight(
         board=[[0, 0, 0, 2], [0, 0, 0, 0], [0, 0, 0, 2], [0, 0, 0, 0]])
     self.assertEqual(
         [[0, 0, 0, 4], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]],
         g.move_up())
Ejemplo n.º 2
0
 def test_move_up_when_has_one_value_and_not_possible_then_error_raised(
         self):
     g = TwoThousandFortyEight(
         board=[[0, 0, 0, 2], [0, 0, 0, 0], [0, 0, 0, 0], [0, 0, 0, 0]])
     with self.assertRaises(ValueError):
         g.move_up()