Added isTileInList function. I may end up re-writing this entire thing it's pretty ugly :(.