コード例 #1
0
ファイル: Organism.cs プロジェクト: rcyogesh/Evolution
    static int GetMatchIndex(Organism org, int[] terrain)
    {
        int diff = 0;
        var data = org.GetMatchData(terrain);

        for (int i = 0; i < data.Length; i++)
        {
            diff += Math.Abs(maxHeight - data[i]);
        }
        return(diff);
    }