#include "shogi.h"
-unsigned int *
+unsigned int * CONV
b_gen_nocaptures( const tree_t * restrict ptree,
unsigned int * restrict pmove )
{
}
bb_piece = BB_BSILVER;
- while( BBToU( bb_piece ) )
+ while( BBTest( bb_piece ) )
{
from = LastOne( bb_piece );
Xor( from, bb_piece );
BBAnd( bb_desti, bb_empty, abb_b_silver_attacks[from] );
- while ( BBToU( bb_desti ) )
+ while ( BBTest( bb_desti ) )
{
to = LastOne( bb_desti );
Xor( to, bb_desti );
}
bb_piece = BB_BTGOLD;
- while( BBToU( bb_piece ) )
+ while( BBTest( bb_piece ) )
{
from = LastOne( bb_piece );
Xor( from, bb_piece );
BBAnd( bb_desti, bb_empty, abb_b_gold_attacks[from] );
utemp = From2Move( from ) | Piece2Move( BOARD[from] );
- while ( BBToU( bb_desti ) )
+ while ( BBTest( bb_desti ) )
{
to = LastOne( bb_desti );
Xor( to, bb_desti );
from = SQ_BKING;
BBAnd( bb_desti, bb_empty, abb_king_attacks[from] );
utemp = From2Move( from ) | Piece2Move( king );
- while ( BBToU( bb_desti ) )
+ while ( BBTest( bb_desti ) )
{
to = LastOne( bb_desti );
Xor( to, bb_desti );
}
bb_piece = BB_BHORSE;
- while( BBToU( bb_piece ) )
+ while( BBTest( bb_piece ) )
{
from = LastOne( bb_piece );
Xor( from, bb_piece );
AttackHorse( bb_desti, from );
BBAnd( bb_desti, bb_desti, bb_empty );
utemp = From2Move( from ) | Piece2Move( horse );
- while ( BBToU( bb_desti ) )
+ while ( BBTest( bb_desti ) )
{
to = LastOne( bb_desti );
Xor( to, bb_desti );
}
bb_piece = BB_BDRAGON;
- while( BBToU( bb_piece ) )
+ while( BBTest( bb_piece ) )
{
from = LastOne( bb_piece );
Xor( from, bb_piece );
AttackDragon( bb_desti, from );
BBAnd( bb_desti, bb_desti, bb_empty );
utemp = From2Move( from ) | Piece2Move( dragon );
- while ( BBToU( bb_desti ) )
+ while ( BBTest( bb_desti ) )
{
to = LastOne( bb_desti );
Xor( to, bb_desti );
bb_empty.p[0] &= 0x1ffU;
bb_piece = BB_BLANCE;
- while( BBToU( bb_piece ) )
+ while( BBTest( bb_piece ) )
{
from = LastOne( bb_piece );
Xor( from, bb_piece );
BBAnd( bb_desti, bb_desti, bb_empty );
utemp = From2Move( from ) | Piece2Move( lance );
- while ( BBToU( bb_desti ) )
+ while ( BBTest( bb_desti ) )
{
to = LastOne( bb_desti );
Xor( to, bb_desti );
}
bb_piece = BB_BKNIGHT;
- while( BBToU( bb_piece ) )
+ while( BBTest( bb_piece ) )
{
from = LastOne( bb_piece );
Xor( from, bb_piece );
BBAnd( bb_desti, bb_empty, abb_b_knight_attacks[from] );
utemp = From2Move( from ) | Piece2Move( knight );
- while ( BBToU( bb_desti ) )
+ while ( BBTest( bb_desti ) )
{
to = LastOne( bb_desti );
Xor( to, bb_desti );
}
-unsigned int *
+unsigned int * CONV
w_gen_nocaptures( const tree_t * restrict ptree,
unsigned int * restrict pmove )
{
}
bb_piece = BB_WSILVER;
- while( BBToU( bb_piece ) )
+ while( BBTest( bb_piece ) )
{
from = FirstOne( bb_piece );
Xor( from, bb_piece );
BBAnd( bb_desti, bb_empty, abb_w_silver_attacks[from] );
- while ( BBToU( bb_desti ) )
+ while ( BBTest( bb_desti ) )
{
to = FirstOne( bb_desti );
Xor( to, bb_desti );
}
bb_piece = BB_WTGOLD;
- while( BBToU( bb_piece ) )
+ while( BBTest( bb_piece ) )
{
from = FirstOne( bb_piece );
Xor( from, bb_piece );
BBAnd( bb_desti, bb_empty, abb_w_gold_attacks[from] );
utemp = From2Move( from ) | Piece2Move( -BOARD[from] );
- while ( BBToU( bb_desti ) )
+ while ( BBTest( bb_desti ) )
{
to = FirstOne( bb_desti );
Xor( to, bb_desti );
from = SQ_WKING;
BBAnd( bb_desti, bb_empty, abb_king_attacks[from] );
utemp = From2Move( from ) | Piece2Move( king );
- while ( BBToU( bb_desti ) )
+ while ( BBTest( bb_desti ) )
{
to = FirstOne( bb_desti );
Xor( to, bb_desti );
}
bb_piece = BB_WHORSE;
- while( BBToU( bb_piece ) )
+ while( BBTest( bb_piece ) )
{
from = FirstOne( bb_piece );
Xor( from, bb_piece );
AttackHorse( bb_desti, from );
BBAnd( bb_desti, bb_desti, bb_empty );
utemp = From2Move( from ) | Piece2Move( horse );
- while ( BBToU( bb_desti ) )
+ while ( BBTest( bb_desti ) )
{
to = FirstOne( bb_desti );
Xor( to, bb_desti );
}
bb_piece = BB_WDRAGON;
- while( BBToU( bb_piece ) )
+ while( BBTest( bb_piece ) )
{
from = FirstOne( bb_piece );
Xor( from, bb_piece );
AttackDragon( bb_desti, from );
BBAnd( bb_desti, bb_desti, bb_empty );
utemp = From2Move( from ) | Piece2Move( dragon );
- while ( BBToU( bb_desti ) )
+ while ( BBTest( bb_desti ) )
{
to = FirstOne( bb_desti );
Xor( to, bb_desti );
bb_empty.p[2] &= 0x7fc0000U;
bb_piece = BB_WLANCE;
- while( BBToU( bb_piece ) )
+ while( BBTest( bb_piece ) )
{
from = FirstOne( bb_piece );
Xor( from, bb_piece );
BBAnd( bb_desti, bb_desti, bb_empty );
utemp = From2Move( from ) | Piece2Move( lance );
- while ( BBToU( bb_desti ) )
+ while ( BBTest( bb_desti ) )
{
to = FirstOne( bb_desti );
Xor( to, bb_desti );
}
bb_piece = BB_WKNIGHT;
- while( BBToU( bb_piece ) )
+ while( BBTest( bb_piece ) )
{
from = FirstOne( bb_piece );
Xor( from, bb_piece );
BBAnd( bb_desti, bb_empty, abb_w_knight_attacks[from] );
utemp = From2Move( from ) | Piece2Move( knight );
- while ( BBToU( bb_desti ) )
+ while ( BBTest( bb_desti ) )
{
to = FirstOne( bb_desti );
Xor( to, bb_desti );