示例#1
0
    public void PackSoloTest()
    {
        var unpacked = new BitsBoard();

        unpacked[82] = true;
        var packed = BitsBoard.Pack(unpacked);

        Assert.AreEqual(new byte[] { 81 }, GetSetBits(packed));
    }
示例#2
0
    public void PackMultiTest()
    {
        var unpacked = new BitsBoard();

        unpacked[82] = true;
        unpacked[84] = true;
        unpacked[86] = true;
        unpacked[88] = true;
        var packed = BitsBoard.Pack(unpacked);

        Assert.AreEqual(new byte[] { 81, 82, 83, 84 }, GetSetBits(packed));
    }