コード例 #1
0
ファイル: test_swirls.py プロジェクト: LittleCube13/CoilSnake
    def test_to_block(self):
        block = Block()

        s = SwirlFrameRow(x1=3, x2=5, x3=55, x4=92)
        block.from_list([33, 33, 33, 33, 33])
        s.to_block(block, 1, False)
        assert_equal([33, 3, 5, 55, 92], block.to_list())

        s = SwirlFrameRow(x1=3, x2=5, x3=0xff, x4=0)
        block.from_list([33, 33, 33, 33, 33])
        s.to_block(block, 2, True)
        assert_equal([33, 33, 3, 5, 33], block.to_list())
コード例 #2
0
ファイル: test_swirls.py プロジェクト: madprogramer/CoilSnake
    def test_to_block(self):
        block = Block()

        s = SwirlFrameRow(x1=3, x2=5, x3=55, x4=92)
        block.from_list([33, 33, 33, 33, 33])
        s.to_block(block, 1, False)
        assert_equal([33, 3, 5, 55, 92], block.to_list())

        s = SwirlFrameRow(x1=3, x2=5, x3=0xff, x4=0)
        block.from_list([33, 33, 33, 33, 33])
        s.to_block(block, 2, True)
        assert_equal([33, 33, 3, 5, 33], block.to_list())