Exemple #1
0
        public void Link_ThreeTiles_LinkedRefsAreCorrect()
        {
            var engine  = new DominoTileEntity(12, 12, true);
            var tileOne = new DominoTileEntity(12, 11);
            var tileTwo = new DominoTileEntity(11, 10);

            tileOne.Link(engine);
            tileTwo.Link(tileOne);

            Assert.True(tileOne.IsLinked(engine));
            Assert.True(tileTwo.IsLinked(tileOne));
            Assert.Equal("FullyLinkedState", tileOne.GetStateType().Name);
            Assert.Equal("HalfLinkedState", tileTwo.GetStateType().Name);
            Assert.Equal(1, tileTwo.GetUnlinkedValues().Count());
            Assert.Equal(10, tileTwo.GetUnlinkedValues().First());
        }