Example #1
0
        public void MatchTest()
        {
            var t = new PaintedTileSetFactory().Create9();

            Assert.IsTrue(t[0].IsMatch(Direction.Bottom, t[3]));
            Assert.IsTrue(t[0].IsMatch(Direction.Right, t[1]));
            Assert.IsTrue(t[0].IsMatch(Direction.Right, t[2]));
            Assert.IsFalse(t[0].IsMatch(Direction.Right, t[8]));

            t[8].Rotation = Rotation.X090;
            Assert.IsTrue(t[1].IsMatch(Direction.Top, t[8]));

            t[1].Rotation = Rotation.X090;
            t[8].Rotation = Rotation.X180;

            Assert.IsTrue(t[1].IsMatch(Direction.Right, t[8]));

            t[1].Rotation = Rotation.X270;
            t[8].Rotation = Rotation.X000;

            Assert.IsTrue(t[1].IsMatch(Direction.Left, t[8]));
            Assert.IsTrue(t[8].IsMatch(Direction.Right, t[1]));

            t[8].Rotation = Rotation.X180;
            Assert.IsFalse(t[8].IsMatch(Direction.Right, t[1]));
        }
Example #2
0
        public void TestMethod5X5()
        {
            this.CreateBitmap();

            var t = new PaintedTileSetFactory().Create25();
            var tableLayout = new TableLayout(t, 25, 5);
            var st = this.CallSearch(tableLayout, false);
            var headerEndY = this.DrawPaintedTilesHeader(t, 100, 100, 5);
            this.DrawResultTileSequences(tableLayout, 100, headerEndY + 100, 4, 100, st.Elapsed);

            this.SaveBitmap("test5X5.png");
        }