|
Britbot
|
Gets all th moves for each pirate in each group.
Definition at line 458 of file Commander.cs. {
//Remove all empty groups
Commander.Groups.RemoveAll(g => g.Pirates.Count == 0);
//Update all groups
Parallel.ForEach(Commander.Groups, g => g.Update());
//A list with all the moves from all groups
List<KeyValuePair<Pirate, Direction>> allMoves =
new List<KeyValuePair<Pirate, Direction>>(Bot.Game.AllMyPirates().Count);
//Get the moves from each group we have
foreach (Group group in Commander.Groups)
allMoves.AddRange(group.GetGroupMoves(cancellationToken).ToList());
//Convert the moves list to dictionary
return allMoves.ToDictionary(pair => pair.Key, pair => pair.Value);
}
|
1.7.6.1