Ejemplo n.º 1
0
    public void TestGetAdjacent()
    {
        List <TileInstance> neighbors;

        // Adjacent instances of the suburbs tile
        neighbors = suburbs.GetAdjacentInstances();
        Assert.AreEqual(1, neighbors.Count);
        Assert.AreEqual(true, neighbors.Contains(park));
        Assert.AreEqual(false, neighbors.Contains(factory));
        Assert.AreEqual(false, neighbors.Contains(park_other));

        // Adjacent instances of the park tile
        neighbors = park.GetAdjacentInstances();
        Assert.AreEqual(2, neighbors.Count);
        Assert.AreEqual(true, neighbors.Contains(suburbs));
        Assert.AreEqual(true, neighbors.Contains(factory));
        Assert.AreEqual(false, neighbors.Contains(suburbs_other));
        Assert.AreEqual(false, neighbors.Contains(factory_other));
    }
Ejemplo n.º 2
0
 public List<TileInstance> GetAdjacent(TileInstance p_tile)
 {
     return p_tile.GetAdjacentInstances ();
 }
Ejemplo n.º 3
0
 public List <TileInstance> GetAdjacent(TileInstance p_tile)
 {
     return(p_tile.GetAdjacentInstances());
 }