public void TestMoverIsMovingATileWhichCanBeMovedDownAllColumnRowColMover()
 {
     var mover = new RowColMover();
     TileFactory tileFactory = new NumberTileFactory();
     FrameBuilder frameBuilder = new ClassicPatternFrameBuilder(tileFactory);
     var frameDirector = new FrameDirector(frameBuilder);
     var initialFrame = frameDirector.ConstructFrame(4, 4);
     var actualFrame = initialFrame.Clone();
     bool moveDown = mover.Move("4", actualFrame);
     Assert.IsTrue(moveDown, "Mover method should return true when the tile can be moved");
     Assert.AreNotEqual(initialFrame, actualFrame, "The frame should be changed when the mover moves the tile");
 }
 public void TestMoverTryMovingANullTileAndTileNotBeMovedRowColMover()
 {
     var mover = new RowColMover();
     TileFactory tileFactory = new NumberTileFactory();
     FrameBuilder frameBuilder = new ClassicPatternFrameBuilder(tileFactory);
     var frameDirector = new FrameDirector(frameBuilder);
     var initialFrame = frameDirector.ConstructFrame(4, 4);
     var actualFrame = initialFrame.Clone();
     bool result = mover.Move(null, actualFrame);
     Assert.IsFalse(result, "Mover method should return false when the tile can not be moved");
     Assert.AreEqual(initialFrame, actualFrame, "The frame should not be changed");
 }
 public void TestShuffleIsMovingATileWhichCanBeMovedByColumnRowColMover()
 {
     var mover = new RowColMover();
     TileFactory tileFactory = new NumberTileFactory();
     FrameBuilder frameBuilder = new ClassicPatternFrameBuilder(tileFactory);
     var frameDirector = new FrameDirector(frameBuilder);
     var initialFrame = frameDirector.ConstructFrame(4, 4);
     var actualFrame = initialFrame.Clone();
     mover.Shuffle(actualFrame);
     Assert.AreNotEqual(initialFrame, actualFrame, "The frame should be changed when shuffled");
 }
 public void TestMoverNotMovingATileWhenInFrameHaveNotNullTileRowColMover()
 {
     var mover = new RowColMover();
     IFrame initialFrame = new Frame(new ITile[,] { { new NumberTile(1) } });
     var actualFrame = initialFrame.Clone();
     bool moveDown = mover.Move("1", actualFrame);
     Assert.IsFalse(moveDown, "Mover method should return false when the tile can not be moved");
     Assert.AreEqual(initialFrame, actualFrame, "The frame should not be changed");
 }