Exemplo n.º 1
0
 public void CanRotateRightTest2()
 {
     for (int i = 0; i < 7; i++)
     {
         Figure figure = new Figure(i, _canvas, _width, _width, _width);
         figure.SetLocation(_width * 4, _width * 4);
         Assert.IsTrue(MovementHelper.CanRotateRight(figure, _canvas));
         _canvas.Children.Clear();
     }
 }
Exemplo n.º 2
0
        public void CanRotateRightTest()
        {
            Figure figureWall = new Figure(4, _canvas, _width, _width, _width);

            figureWall.SetLocation((int)_canvas.Width - _width * 3, (int)_canvas.Height - _width * 4);
            MovementHelper.RotateLeft(figureWall, _canvas);
            for (int i = 0; i < 7; i++)
            {
                Figure figure = new Figure(i, _canvas, _width, _width, _width);
                MovementHelper.RotateLeft(figure, _canvas);
                figure.SetLocation((int)_canvas.Width - _width * 2, (int)_canvas.Height - figureWall.Height - _width);
                Assert.IsFalse(MovementHelper.CanRotateRight(figure, _canvas));
                _canvas.Children.Remove(figure);
            }
        }