Beispiel #1
0
    public void _2_2_GetNeighboursOfMazeElement_CheckIfresultIsEqualWithCorrect()
    {
        Vector2       gamePlaneSize = new Vector2(10, 10);
        IPlaneBuilder planeBoundry  = GetPlaneBuilderMock(gamePlaneSize);
        PlaneBuilder  planeBuilder  = Substitute.For <PlaneBuilder>();

        planeBuilder.SetPlaneController(planeBoundry);

        IMazeElement        currentMazeElement       = planeBoundry.GetFromMazeArray(2, 8);
        List <IMazeElement> neighbourMazeElementList = planeBuilder.GetNeighboursOfMazeElement(currentMazeElement);

        List <IMazeElement> list = CreateNeighbourList(planeBoundry, currentMazeElement);

        Assert.AreEqual(neighbourMazeElementList, list);
    }
 public List <IMazeElement> GetNeighboursOfMazeElement(IMazeElement mazeElement)
 {
     return(gamePlaneBuilder.GetNeighboursOfMazeElement(mazeElement));
 }