Exemplo n.º 1
0
        public void TestMS1BIndex()
        {
            TestingHelper testingHelper = new TestingHelper();
            Initialiser   bitboards     = new Initialiser();

            UInt64[] rankDiags = bitboards.InitialiseRankDiagonals();
            UInt64   diag      = rankDiags[1];

            BitHelper bitHelper = new BitHelper();

            int ms1bIndex = BitHelper.GetMostSignificant1BitIndex2(diag);

            // bitHelper.GetMostSignificant1BitIndex(diag);
            Debug.WriteLine("Diagonal:");
            Debug.WriteLine(testingHelper.BitboardToBoardString(diag));
        }
Exemplo n.º 2
0
        public void GetMS1BIndexTest()
        {
            int ms1bIndex = BitHelper.GetMostSignificant1BitIndex2(562949953421315);

            Assert.AreEqual(49, ms1bIndex);
        }