3 #ifndef MOBILITY_ROOK_MOBILITY_H 
    4 #define MOBILITY_ROOK_MOBILITY_H 
   36           countVerticalBoth<BLACK>(state,p,countAll,countSafe);
 
   38           countVerticalBoth<WHITE>(state,p,countAll,countSafe);
 
   46         const Square posU=state.mobilityOf(
U,num);
 
   47         const Square posD=state.mobilityOf(
D,num);
 
   49           (state.pieceAt(posU).template canMoveOn<P>() ? 1 : 0)+
 
   50           (state.pieceAt(posD).template canMoveOn<P>() ? 1 : 0);
 
   55         return countVerticalAll<P>(state,p.
number());
 
   59           return countVerticalAll<BLACK>(state,p);
 
   61           return countVerticalAll<WHITE>(state,p);
 
   75           return countVerticalSafe<BLACK>(state,p);
 
   77           return countVerticalSafe<WHITE>(state,p);
 
   97           countHorizontalBoth<BLACK>(state,p,countAll,countSafe);
 
   99           countHorizontalBoth<WHITE>(state,p,countAll,countSafe);
 
  105         const Square posR=state.mobilityOf(
R,num);
 
  106         const Square posL=state.mobilityOf(
L,num);
 
  107         int count=(posL.
x()-posR.
x()-2)+
 
  108           (state.pieceAt(posR).template canMoveOn<P>() ? 1 : 0)+
 
  109           (state.pieceAt(posL).template canMoveOn<P>() ? 1 : 0);
 
  117         return countHorizontalAll<P>(state,p.
number());
 
  121           return countHorizontalAll<BLACK>(state,p);
 
  123           return countHorizontalAll<WHITE>(state,p);
 
  137           return countHorizontalSafe<BLACK>(state,p);
 
  139           return countHorizontalSafe<WHITE>(state,p);