public void TestMoveOn_With_Board() { Ball ball = new Ball(1, 2); GameMap board = new GameMap(80, 10, 1, 1, new Point(40, 0), ball); ball.MoveAt(4, 4); Assert.AreEqual(4, ball.CPoint.X); Assert.AreEqual(4, ball.CPoint.Y); }
public void TestCanBeMovedOn_With_Board() { Ball ball = new Ball(1, 2); GameMap map = new GameMap(80, 20, 1, 1, new Point(40, 0), ball); Assert.IsFalse(ball.CanBeMoveAt(-1, -1)); Assert.IsTrue(ball.CanBeMoveAt(1, 3)); Assert.IsTrue(ball.CanBeMoveAt(8, 4)); Assert.IsFalse(ball.CanBeMoveAt(-1, -2)); Assert.IsFalse(ball.CanBeMoveAt(9, -1)); Assert.IsFalse(ball.CanBeMoveAt(-2, -1)); Assert.IsTrue(ball.CanBeMoveAt(0, 5)); Assert.IsFalse(ball.CanBeMoveAt(0, -3)); }
public void TestMoveOn_With_Board_WrongY() { Ball ball = new Ball(1, 2); GameMap board = new GameMap(80, 20, 1, 1, new Point(40, 0), ball); ball.MoveAt(2, -3); }