Britbot
static Score [] Britbot.Commander.GetSpecificAssignmentScores ( IReadOnlyList< Score[]>  possibleAssignments,
int[]  assignment 
) [inline, static, private]

Given all the possible assignments, and a specific assignment (given by array of indexes) returns the actual scores corresponding to this assignment.

Parameters:
possibleAssignmentsjagged array of all possible assignments
assignmentindexes of this assignment
Returns:

Definition at line 509 of file Commander.cs.

        {
            //declare the array to later be returned
            Score[] scoreArr = new Score[possibleAssignments.Count];

            //fill the array with the appropriate values
            for (int i = 0; i < scoreArr.Length; i++)
                //fill the i'th place of the score array with the target of the i'th group in the assignment index
                scoreArr[i] = possibleAssignments[i][assignment[i]];

            //return the result
            return scoreArr;
        }