Ejemplo n.º 1
0
    def test_wire_sand_below(self):
        """
        Wire will power the plain block beneath it.
        """

        asic = Asic()
        sand = PlainBlock((0, 0, 0), blocks["sand"].slot, 0x0)
        wire = Wire((0, 1, 0), blocks["redstone-wire"].slot, 0x0)

        sand.connect(asic)
        wire.connect(asic)

        wire.status = True
        sand.update()
        self.assertTrue(wire.status)

        wire.status = False
        sand.update()
        self.assertFalse(wire.status)
Ejemplo n.º 2
0
    def test_wire_sand_below(self):
        """
        Wire will power the plain block beneath it.
        """

        asic = Asic()
        sand = PlainBlock((0, 0, 0), blocks["sand"].slot, 0x0)
        wire = Wire((0, 1, 0), blocks["redstone-wire"].slot, 0x0)

        sand.connect(asic)
        wire.connect(asic)

        wire.status = True
        sand.update()
        self.assertTrue(wire.status)

        wire.status = False
        sand.update()
        self.assertFalse(wire.status)
Ejemplo n.º 3
0
    def test_lever_sand(self):
        """
        A lever attached to a sand block will cause the sand block to have the
        same value as the lever.
        """

        asic = Asic()
        lever = Lever((0, 0, 0), blocks["lever"].slot,
                      blocks["lever"].orientation("-x"))
        sand = PlainBlock((1, 0, 0), blocks["sand"].slot, 0x0)

        lever.connect(asic)
        sand.connect(asic)

        lever.status = False
        sand.update()
        self.assertFalse(sand.status)

        lever.status = True
        sand.update()
        self.assertTrue(sand.status)
Ejemplo n.º 4
0
    def test_lever_sand(self):
        """
        A lever attached to a sand block will cause the sand block to have the
        same value as the lever.
        """

        asic = Asic()
        lever = Lever((0, 0, 0), blocks["lever"].slot,
            blocks["lever"].orientation("-x"))
        sand = PlainBlock((1, 0, 0), blocks["sand"].slot, 0x0)

        lever.connect(asic)
        sand.connect(asic)

        lever.status = False
        sand.update()
        self.assertFalse(sand.status)

        lever.status = True
        sand.update()
        self.assertTrue(sand.status)