public void CanRotateLeftTest2() { 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.CanRotateLeft(figure, _canvas)); _canvas.Children.Clear(); } }
public void CanRotateLeftTest1() { Figure figureWall = new Figure(4, _canvas, _width, _width, _width); figureWall.SetLocation(_width * 2, (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(0, (int)_canvas.Height - figureWall.Height - _width); Assert.IsFalse(MovementHelper.CanRotateLeft(figure, _canvas)); _canvas.Children.Remove(figure); } }