示例#1
0
文件: wind.c 项目: dancrossnyc/harvey
Window*
wtop(void)
{
	print_func_entry();
	exits("wtop!");
#if 0
	Window *w;

	w = wpointto(pt);
	if(w){
		if(w->topped == topped)
			return nil;
		topwindow(w->i);
		wcurrent(w);
		w->topped = ++topped;
	}
#endif
	print_func_exit();
	return nil;
}
示例#2
0
void eval_shield(pawn_entry_t *p, int *scoremg)
{ int current, min, penalty;
  uint8 castle;
  if(pos->pcount[BQ])
  { min = INF;
    current = wcurrent(p, pos->ksq[W]);
    castle = pos->castle & ~(BLACK_OO|BLACK_OOO);
    if(castle  & WHITE_OO) min = p->wg1;
    if((castle & WHITE_OOO) && (min > p->wb1)) min = p->wb1;    
    if(castle && (min < current)) penalty = (min + current) / 2;
    else penalty = current;
    *(scoremg) -= penalty;
  }
  if(pos->pcount[WQ])
  { min = INF;
    current = bcurrent(p, pos->ksq[B]);
    castle = pos->castle & ~(WHITE_OO|WHITE_OOO);
    if(castle  & BLACK_OO) min = p->bg8;
    if((castle & BLACK_OOO) && (min > p->bb8)) min = p->bb8;
    if(castle && (min < current)) penalty = (min + current) / 2;
    else penalty = current;
    *(scoremg) += penalty;
  }
}