Esempio n. 1
0
 void Awake()
 {
     // TODO: Make rewards and hazards random.
     _mazeCell           = new MazeCellZ();
     _mazeCell.HasHazard = true;
     _mazeCell.HasReward = true;
 }
Esempio n. 2
0
    public void DefaultMazeCellZIsNotValid()
    {
        // Arrange and Act
        MazeCellZ mazeCell = new MazeCellZ();

        // Assert
        Assert.IsFalse(mazeCell.IsValid());         // A MazeCellZ is constructed with four walls
    }
Esempio n. 3
0
    public void MazeCellZHasValidNumberOfWallsTest()
    {
        // Arrange
        MazeCellZ mazeCell = new MazeCellZ();

        // Act and Assert
        mazeCell.RemoveWall(WallIndex.NorthWall);
        Assert.IsTrue(mazeCell.IsValid());

        mazeCell.RemoveWall(WallIndex.EastWall);
        Assert.IsTrue(mazeCell.IsValid());

        mazeCell.RemoveWall(WallIndex.SouthWall);
        Assert.IsTrue(mazeCell.IsValid());

        mazeCell.RemoveWall(WallIndex.WestWall);
        Assert.IsTrue(mazeCell.IsValid());
    }