public void PackSoloTest() { var unpacked = new BitsBoard(); unpacked[82] = true; var packed = BitsBoard.Pack(unpacked); Assert.AreEqual(new byte[] { 81 }, GetSetBits(packed)); }
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)); }