Gonna be honest, I probably have a bad title there, so allow me to explain. (Title suggestions are welcome!)

First and foremost, I have a 'List' aptly named TileList. Tile is a class that contains a few variables, but the important ones are these two: public int xCoor and public int yCoor.

TileList is automatically filled by an outside function. In this case, it's filled with exactly 100 instances of the Tile class, each with a different set of xCoor and yCoor- with xCoors from 0 to 9 as well as yCoors from 0 to 9, basically simulating a 10x10 grid.

As it's filled by an outside function, it's not always 10x10, it can also be 5x15 or 20x20 and so on.

I have a function that grabs a specific tile, named FindTile- that one works perfectly thus far...

But now I need one that selects a diamond shape from the grid, based on a starting point and a radius. And my own attempt, the FindDiamond function.. is very messy and takes forever to load.. and in fact sometimes doesn't even work.

This is basically what I want to do: [Grid example](http://i.stack.imgur.com/DOKb0.png)

**Code is down below:**

```
public class Tile
{
    public int xCoor;
    public int yCoor;

    //more variables
}

public class TileFinder
{
    public List<Tile> TileList = new List<Tile>();

    //Give back tiles when generated
    public void SaveGeneratedTiles(List<Tile> Save)
    {
        TileList = Save;
    }

    public Tile FindTile(int tileX, int tileY)
    {
        for (int i = 1; i < TileList.Count; i++)
        {
            if (TileList[i].xCoor == tileX && TileList[i].yCoor == tileY)
            {
                return TileList[i];
            }
        }
        return null;
    }

    public List<Tile> FindDiamond(int tileX, int tileY, int radius)
    {
        List<Tile> ReturnList = new List<Tile>();

        for (int r = 0; r <= radius; r++)
        {
            int curx = tileX + r;
            int cury = tileY;

            if (curx == tileX) { FindTile(curx, cury); }
            else
            {
                while (curx != -r)
                {
                    curx--;
                    cury--;
                    ReturnList.Add(FindTile(curx, cury));
                }
                while (cury != -r)
                {
                    curx++;
                    cury--;
                    ReturnList.Add(FindTile(curx, cury));
                }
                while (curx != r)
                {
                    curx++;
                    cury++;
                    ReturnList.Add(FindTile(curx, cury));
                }
                while (curx != -r)
                {
                    curx--;
                    cury++;
                    ReturnList.Add(FindTile(curx, cury));
                }
            }
        }
        return ReturnList;
    }
}

```

Frankly, I'm looking for a better way to make this work, that does end in a returned List at the end.. Other parts of my code function off of this, which in fact may also not be the best way, but I'm still blundering my way through this. :)

*TL;DR I'm trying to emulate something like Advance Wars, and I need the diamond shape to select ranges for fog of war vision, indirect attacks, etc.*