+void init()
+{
+ const int c[RANK_NB] = {0, 6, 15, 10, 57, 75, 135, 258};
+
+ for (Rank r = RANK_2; r <= RANK_7; ++r)
+ for (int opposed = false; opposed <= true; ++opposed)
+ for (int phalanx = false; phalanx <= true; ++phalanx)
+ {
+ int bonus = c[r] + (phalanx ? (c[r + 1] - c[r]) / 2 : 0);
+ Connected[opposed][phalanx][r] = make_score(bonus / 2, bonus >> opposed);
+ }
+}
+