Fix outpost code so only pieces protected by own pawn get outpost bonus.
Templatize outpost function.