Hm. Is there any situation where you'd need to know another team's legal moves in order to calculate something for the currently moving team? I can't think of anything, so I guess this is fine. Also, I initially misread what you were doing here and thought you were computing legal destinations for all the teams and only saving one of them.