Little better functional use

use pos.pieces(Color, tp1, tp2) instead of explicit bitwise operation.