示例#1
0
    public void CoordinateToString()
    {
        var expected = "(1, 2)";
        var actual   = new PathFinding.Coordinate(1, 2).ToString();

        Assert.Equal(expected, actual);
    }
示例#2
0
    public void CoordinateEqualsNotCoordinateOther()
    {
        var expected = new PathFinding.Coordinate(1, 2);
        var actual   = 1;

        Assert.False(expected.Equals(actual));
    }
示例#3
0
    public void CoordinateEqualsNotCoordinateNull()
    {
        var expected = new PathFinding.Coordinate(1, 2);
        var actual   = (object?)null;

        Assert.False(expected.Equals(actual));
    }
示例#4
0
    public void CoordinateEqualsCoordinateNull()
    {
        var expected = new PathFinding.Coordinate(1, 2);
        var actual   = default(PathFinding.Coordinate);

        Assert.False(expected.Equals(actual));
    }
示例#5
0
    public void CoordinateEquals()
    {
        var expected = new PathFinding.Coordinate(1, 2);
        var actual   = (object)new PathFinding.Coordinate(1, 2);

        Assert.True(expected.Equals(actual));
    }
示例#6
0
 public void setBlock(Coordinate target, bool blocked)
 {
     this.BlockData[target.Row, target.Column].Blocked = blocked;
 }