예제 #1
0
    public void RemovePartTest()
    {
        // Test randomly attached part
        PartData        partData = new PartData();
        AxialCoordinate coord    = new AxialCoordinate {
            x = -1, y = 0
        };
        Part addedPart = new Part {
            shape = new GameObject(), type = -1
        };

        partData.addPart(coord, addedPart);

        partData.removePart(coord);
        // If null, part is not present
        Assert.Null(partData.getPart(coord));
    }