public void SteinTest()
 {
     Assert.AreEqual(Stein.GCD(-6, 18, 42), 6);
     Assert.AreEqual(Stein.GCD(126, 540), 18);
     Assert.AreEqual(Stein.GCD(0, 18), 18);
     Assert.AreEqual(Stein.GCD(30, 18), 6);
 }
Beispiel #2
0
        public void Gcd5ZeroInArgumentsMustBeZeroOutput()
        {
            var euclidGcd = Euclidean.Euclidean.Gcd5(0, 0, 0, 0, 0);
            var steinGcd  = Stein.Gcd5(0, 0, 0, 0, 0);

            Assert.AreEqual(euclidGcd, steinGcd);
            Assert.AreEqual(euclidGcd, (uint)0);
        }
Beispiel #3
0
 public void Gcd2QuadsShouldBeEquivalent()
 {
     for (uint i = 1, j = 1; i < 32; j <<= 1, i++)
     {
         var euclidGcd = Euclidean.Euclidean.Gcd(j, j / 2);
         var steinGcd  = Stein.Gcd(j, j / 2);
         Assert.AreEqual(euclidGcd, steinGcd);
     }
 }
Beispiel #4
0
        public static void LoadContent(ContentManager content)
        {
            Gras.LoadContent(content, @"terrain\0");

            Holzfäller.LoadContent(content, @"buildings\holzfäller");

            MouseCursor.LoadContent(content, @"gui\cursor");
            FreeSpace.LoadContent(content, @"gui\freespace");
            BlockedSpace.LoadContent(content, @"gui\blockedspace");
            Bar.LoadContent(content, @"gui\bar");
            Holz.LoadContent(content, @"gui\holz");
            Stein.LoadContent(content, @"gui\stein");
            Werkzeug.LoadContent(content, @"gui\werkzeug");
            Pixel.LoadContent(content, @"gui\pixel");
        }