Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
include
osl
move_generator
open.h
Go to the documentation of this file.
1
#ifndef _GENERATE_OPEN_MOVES_H
2
#define _GENERATE_OPEN_MOVES_H
3
#include "
osl/move_generator/pieceOnBoard.h
"
4
#include "
osl/move_generator/promoteType.h
"
5
#include "
osl/move_action/concept.h
"
6
#include "
osl/state/numEffectState.h
"
7
#include <boost/static_assert.hpp>
8
// Open<StoreMoveAction> 以外の組み合わせで使うときは
9
// open.tcc もinclude すること (但しコンパイル時間がかかるので推奨しない)
10
11
namespace
osl
12
{
13
namespace
move_generator
14
{
20
template
<
class
Action>
21
class
Open
22
{
23
// BOOST_CLASS_REQUIRE(Action,osl::move_action,Concept);
24
public
:
25
template
<Player P>
26
static
void
generate
(
const
NumEffectState& state,
Piece
p,Action& action,
Square
to,
Direction
dir);
27
28
};
29
30
struct
GenerateOpen
31
{
32
template
<
class
Action>
33
static
void
34
generate
(
Player
pl,
const
NumEffectState& state,
Piece
p,
35
Action& action,
Square
to,
Direction
dir)
36
{
37
if
(pl ==
BLACK
)
38
Open<Action>::template
generate<BLACK>(state, p, action, to, dir);
39
else
40
Open<Action>::template
generate<WHITE>(state, p, action, to, dir);
41
}
42
};
43
44
}
// namespace move_generator
45
}
// namespace osl
46
#endif
/* _GENERATE_OPEN_MOVES_H */
47
// ;;; Local Variables:
48
// ;;; mode:c++
49
// ;;; c-basic-offset:2
50
// ;;; End:
Generated on Sun Jul 21 2013 13:37:25 by
1.8.4