Exemple #1
0
        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));
        }
Exemple #2
0
 public void TestCanBeMovedOn_Without_Map()
 {
     Ball ball = new Ball(1, 2);
     Assert.IsFalse(ball.CanBeMoveAt(2, 2));
 }