コード例 #1
0
        public void GetRandomDirection()
        {
            Maze target = new Maze(2, 2);

            MazeHelper.ResetRandomDirection();

            Direction dir1 = MazeHelper.GetRandomDirection();
            Direction dir2 = MazeHelper.GetRandomDirection();
            Direction dir3 = MazeHelper.GetRandomDirection();
            Direction dir4 = MazeHelper.GetRandomDirection();

            Assert.IsTrue(dir1 != dir2 && dir1 != dir3 && dir1 != dir4);
            Assert.IsTrue(dir2 != dir3 && dir2 != dir4);
            Assert.IsTrue(dir3 != dir4);
        }