Exemplo n.º 1
0
    def test_torch_plus_y_iter_inputs(self):
        """
        A torch with +y orientation sits on top of a block.
        """

        torch = Torch((0, 1, 0), blocks["redstone-torch"].slot,
                      blocks["redstone-torch"].orientation("+y"))

        self.assertTrue((0, 0, 0) in torch.iter_inputs())
Exemplo n.º 2
0
    def test_torch_plus_y_iter_inputs(self):
        """
        A torch with +y orientation sits on top of a block.
        """

        torch = Torch((0, 1, 0), blocks["redstone-torch"].slot,
            blocks["redstone-torch"].orientation("+y"))

        self.assertTrue((0, 0, 0) in torch.iter_inputs())
Exemplo n.º 3
0
    def test_torch_plus_z_input_output(self):
        """
        A torch with +z orientation accepts input from one block, and sends
        output to three blocks around it.
        """

        torch = Torch((0, 0, 0), blocks["redstone-torch"].slot,
                      blocks["redstone-torch"].orientation("+z"))

        self.assertTrue((0, 0, -1) in torch.iter_inputs())
        self.assertTrue((0, 0, 1) in torch.iter_outputs())
        self.assertTrue((1, 0, 0) in torch.iter_outputs())
        self.assertTrue((-1, 0, 0) in torch.iter_outputs())
Exemplo n.º 4
0
    def test_torch_plus_z_input_output(self):
        """
        A torch with +z orientation accepts input from one block, and sends
        output to three blocks around it.
        """

        torch = Torch((0, 0, 0), blocks["redstone-torch"].slot,
            blocks["redstone-torch"].orientation("+z"))

        self.assertTrue((0, 0, -1) in torch.iter_inputs())
        self.assertTrue((0, 0, 1) in torch.iter_outputs())
        self.assertTrue((1, 0, 0) in torch.iter_outputs())
        self.assertTrue((-1, 0, 0) in torch.iter_outputs())