While I have been able to start on the creation of paths, I have hit a slight wall in dealing with a foreach loop. Tiles for a path are selected, and being added to a list that would comprise of every tile moved to along the path. The issue is, players can double back on themselves, by selecting a previously selected, adjacent tile. I have attempted to create a foreach loop, as below in Tile.cs, that looks for any member of the list that matches the tile being added. If already there, it should remove the tile from the list, but currently, the foreach is only reaching the first entry of the list, and never going further.
Further details on progress can be found in the comments on Tile.cs.
No comments:
Post a Comment