File: fixedDepthSearcher.cc

package info (click to toggle)
libosl 0.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 273,976 kB
  • sloc: cpp: 129,625; ansic: 7,145; ruby: 1,290; makefile: 558; perl: 413; sh: 35
file content (72 lines) | stat: -rw-r--r-- 2,168 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
/* fixedDepthSearcher.cc
 */
#include "osl/checkmate/fixedDepthSearcher.h"
#include "osl/checkmate/fixedDepthSearcher.tcc"
#include "osl/state/numEffectState.tcc"

const osl::checkmate::ProofDisproof 
osl::checkmate::FixedDepthSearcher::
hasCheckmateMoveOfTurn(int depth, Move& best_move, PieceStand& proof_pieces)
{
  if (state->turn() == BLACK)
    return hasCheckmateMove<BLACK>(depth, best_move, proof_pieces);
  else
    return hasCheckmateMove<WHITE>(depth, best_move, proof_pieces);
}

const osl::checkmate::ProofDisproof 
osl::checkmate::FixedDepthSearcher::
hasCheckmateMoveOfTurn(int depth, Move& best_move)
{
  if (state->turn() == BLACK)
    return hasCheckmateMove<BLACK>(depth, best_move);
  else
    return hasCheckmateMove<WHITE>(depth, best_move);
}

const osl::checkmate::ProofDisproof 
osl::checkmate::FixedDepthSearcher::
hasCheckmateWithGuideOfTurn(int depth, Move& guide, PieceStand& proof_pieces)
{
  if (state->turn() == BLACK)
    return hasCheckmateWithGuide<BLACK>(depth, guide, proof_pieces);
  else
    return hasCheckmateWithGuide<WHITE>(depth, guide, proof_pieces);
}

const osl::checkmate::ProofDisproof 
osl::checkmate::FixedDepthSearcher::
hasEscapeMoveOfTurn(Move last_move, int depth)
{
  if (state->turn() == BLACK)
    return hasEscapeMove<BLACK>(last_move, depth);
  else
    return hasEscapeMove<WHITE>(last_move, depth);
}

const osl::checkmate::ProofDisproof 
osl::checkmate::FixedDepthSearcher::
hasEscapeByMoveOfTurn(Move next_move, int depth, 
		      Move& check_move, PieceStand& proof_pieces)
{
  if (state->turn() == BLACK)
    return hasEscapeByMove<WHITE>(next_move, depth, check_move, proof_pieces);
  else
    return hasEscapeByMove<BLACK>(next_move, depth, check_move, proof_pieces);
}

const osl::checkmate::ProofDisproof 
osl::checkmate::FixedDepthSearcher::
hasEscapeByMoveOfTurn(Move next_move, int depth)
{
  if (state->turn() == BLACK)
    return hasEscapeByMove<WHITE>(next_move, depth);
  else
    return hasEscapeByMove<BLACK>(next_move, depth);
}

/* ------------------------------------------------------------------------- */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End: