You will want to create a FlagTile and possible extend it with a FinalFlagTile. In FlagTile you may (but are not required to) have a nextFlag field which states the FlagTile one should visit after this one. You can then store the Robots who are heading toward that tile there. For the first FlagTile you will want to have it contain all Robots initially when the game starts. The FinalFlagTile will then have added functionality to end the game and declare a winner.
Again, this is purely optional as there are other ways to implement this. Remember, you can modify any of the code given to you to meet your needs. However, you should only modify it if you absolutely have to as it has been provided to make things easier for you.
Joe
Sent from my android device.