* Tries to find given tile and dir in the set * @param tile tile * @param dir and dir to find * @return true iff the tile & dir element was found */
| 137 | * @return true iff the tile & dir element was found |
| 138 | */ |
| 139 | bool IsIn(TileIndex tile, Tdir dir) |
| 140 | { |
| 141 | for (uint i = 0; i < this->n; i++) { |
| 142 | if (this->data[i].tile == tile && this->data[i].dir == dir) return true; |
| 143 | } |
| 144 | |
| 145 | return false; |
| 146 | } |
| 147 | |
| 148 | /** |
| 149 | * Adds tile & dir into the set, checks for full set |