virtualPin.cc Source File

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
virtualPin.cc
Go to the documentation of this file.
1 /* virtualPin.cc
2 */
3 #include "osl/effect_util/virtualPin.h"
4
5 bool osl::effect_util::
6 VirtualPin::find(const NumEffectState& state, Player defense, const PieceMask& remove)
7 {
8 const Square target = state.kingSquare(defense);
9 return findDirection<UL>(state, target, defense, remove)
10 || findDirection<U>(state, target, defense, remove)
11 || findDirection<UR>(state, target, defense, remove)
12 || findDirection<L>(state, target, defense, remove)
13 || findDirection<R>(state, target, defense, remove)
14 || findDirection<DL>(state, target, defense, remove)
15 || findDirection<D>(state, target, defense, remove)
16 || findDirection<DR>(state, target, defense, remove);
17 }
18
19 /* ------------------------------------------------------------------------- */
20 // ;;; Local Variables:
21 // ;;; mode:c++
22 // ;;; c-basic-offset:2
23 // ;;; End: