Esempio n. 1
0
 def test_brick_previous_state_both_falling_different_directions(self):
     brick = Brick(1, 2, 0)
     brick.previous_state()
     self.assertEqual(brick.state, 1)
Esempio n. 2
0
 def test_brick_previous_state_none_falling(self):
     brick = Brick(1, 1, 1)
     brick.previous_state()
     self.assertEqual(brick.state, 1)
Esempio n. 3
0
 def test_brick_previous_state_falling_right(self):
     brick = Brick(2, 2, 1)
     brick.previous_state()
     self.assertEqual(brick.state, 1)
Esempio n. 4
0
 def test_brick_previous_state_falling_left(self):
     brick = Brick(0, 1, 0)
     brick.previous_state()
     self.assertEqual(brick.state, 1)
Esempio n. 5
0
 def test_brick_previous_state_all_falling_right(self):
     brick = Brick(0, 0, 0)
     brick.previous_state()
     self.assertEqual(brick.state, 0)
Esempio n. 6
0
 def test_brick_previous_state_all_falling_left(self):
     brick = Brick(2, 2, 2)
     brick.previous_state()
     self.assertEqual(brick.state, 2)