def test_brick_previous_state_both_falling_different_directions(self): brick = Brick(1, 2, 0) brick.previous_state() self.assertEqual(brick.state, 1)
def test_brick_previous_state_none_falling(self): brick = Brick(1, 1, 1) brick.previous_state() self.assertEqual(brick.state, 1)
def test_brick_previous_state_falling_right(self): brick = Brick(2, 2, 1) brick.previous_state() self.assertEqual(brick.state, 1)
def test_brick_previous_state_falling_left(self): brick = Brick(0, 1, 0) brick.previous_state() self.assertEqual(brick.state, 1)
def test_brick_previous_state_all_falling_right(self): brick = Brick(0, 0, 0) brick.previous_state() self.assertEqual(brick.state, 0)
def test_brick_previous_state_all_falling_left(self): brick = Brick(2, 2, 2) brick.previous_state() self.assertEqual(brick.state, 2)