Subversion Repositories Kolibri OS

Rev

Rev 1805 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1805 Rev 4652
Line 48... Line 48...
48
  virtual tvalue GetValue(const Position &pos, int num = 0);
48
  virtual tvalue GetValue(const Position &pos, int num = 0);
49
  tvalue GetFullValue(const Position &pos, int num = 0);
49
  tvalue GetFullValue(const Position &pos, int num = 0);
50
  tvalue FindBMove(Z &z, int num, PMvv *pmv, int zn = -1,
50
  tvalue FindBMove(Z &z, int num, PMvv *pmv, int zn = -1,
51
                tvalue a = -2 * win_val, tvalue b = 2 * win_val);
51
                tvalue a = -2 * win_val, tvalue b = 2 * win_val);
52
public:
52
public:
53
  void (*draw)(void*, int = 0);
53
  void (*draw)(void*, int ); //draw() wants int = 0 as a default argument
54
  void *data;
54
  void *data;
55
};
55
};
Line 56... Line 56...
56
 
56
 
57
template 
57
template 
Line 784... Line 784...
784
tvalue TBaseCompPlayer::FindBMove(Z &z, int num,
784
tvalue TBaseCompPlayer::FindBMove(Z &z, int num,
785
                           PMvv *pmv, int zn, tvalue a, tvalue b)
785
                           PMvv *pmv, int zn, tvalue a, tvalue b)
786
{
786
{
787
  assert(b > a);
787
  assert(b > a);
788
  assert(num >= 0);
788
  assert(num >= 0);
789
  if (num >= 3 && draw) draw(data);
789
  if (num >= 3 && draw) draw(data, 0);
790
  int nlast = z.narr;
790
  int nlast = z.narr;
791
  if (zn < 0) {z.AddPos(); z.array[zn = z.narr++] = *pmv;}
791
  if (zn < 0) {z.AddPos(); z.array[zn = z.narr++] = *pmv;}
792
  if (pmv) pmv->mv[0] = 0;
792
  if (pmv) pmv->mv[0] = 0;
793
  int n0 = z.narr;
793
  int n0 = z.narr;
794
  int was_eat = z.FindAllMoves(z.array[zn], num <= 0);
794
  int was_eat = z.FindAllMoves(z.array[zn], num <= 0);