So I'm trying to implement a method in a `Grid` class that returns the tile (which is an instance of the tile class) specified by two coordinates the user inputs. But I have no idea how to go about implementing it.

I have an `ArrayList` that contains all the instances of the tiles like this `tiles.add(new Tile(x, y));`

This is the method in question and my attempt at returning the desired tile:

```
   public ArrayList<Tile> getTileAtPos(int xCoor, int yCoor) {
        // if the coordinates are out of bounds
        // return null;

        // else
        return tiles.get(/*???*/); //   <---------------------- have no clue
    }

```