Exemplo n.º 1
0
    def test_move_box_into_wall(self):
        world = self.make_world_worker_moves_box_into_wall(2, 2)

        GameEngine.move(Dir.DN, world)

        self.assertFalse(world.push_box.called)
        self.assertFalse(world.move_worker.called)
Exemplo n.º 2
0
    def test_move_box(self):
        world = self.make_world_worker_moves_box(2, 2)

        GameEngine.move(Dir.DN, world)

        world.push_box.assert_called_with((2, 3), (2, 4))
        world.move_worker.assert_called_with((2, 3))
Exemplo n.º 3
0
    def test_move_right(self):
        world = self.make_world_worker_moves_on_floor(2, 2)

        GameEngine.move(Dir.RT, world)

        world.move_worker.assert_called_with((3, 2))
Exemplo n.º 4
0
    def test_move_down(self):
        world = self.make_world_worker_moves_on_floor(2, 2)

        GameEngine.move(Dir.DN, world)

        world.move_worker.assert_called_with((2, 3))