File: immediateCheckmate.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 (57 lines) | stat: -rw-r--r-- 1,471 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
/* immediateCheckmate.cc
 */

#include "osl/checkmate/immediateCheckmate.tcc"
#include "osl/checkmate/king8Info.h"

namespace osl
{
  namespace checkmate
  {
    template 
    bool ImmediateCheckmate::
    hasCheckmateMove<BLACK>(NumEffectState const&, King8Info, Square, Move&);
    template 
    bool osl::checkmate::ImmediateCheckmate::
    hasCheckmateMove<WHITE>(NumEffectState const&, King8Info, Square, Move&);

    template 
    bool ImmediateCheckmate::
    hasCheckmateMove<BLACK>(NumEffectState const&, Move&);
    template 
    bool osl::checkmate::ImmediateCheckmate::
    hasCheckmateMove<WHITE>(NumEffectState const&, Move&);

    template 
    bool ImmediateCheckmate::
    hasCheckmateMove<BLACK>(NumEffectState const&);
    template 
    bool osl::checkmate::ImmediateCheckmate::
    hasCheckmateMove<WHITE>(NumEffectState const&);
  }
}

bool osl::checkmate::ImmediateCheckmate::
hasCheckmateMove(Player pl,NumEffectState const& state)
{
  if(pl==BLACK)
    return hasCheckmateMove<BLACK>(state);
  else
    return hasCheckmateMove<WHITE>(state);

}
bool osl::checkmate::ImmediateCheckmate::
hasCheckmateMove(Player pl,NumEffectState const& state,Move& bestMove)
{
  if(pl==BLACK)
    return hasCheckmateMove<BLACK>(state,bestMove);
  else
    return hasCheckmateMove<WHITE>(state,bestMove);
}

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