Main Page
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
lib
threatmate
kfendPredictor.cc
Go to the documentation of this file.
1
/* kfendPredictor.cc
2
*/
3
#include "
osl/threatmate/kfendPredictor.h
"
4
5
bool
osl::threatmate::KfendPredictor::predict
(
const
NumEffectState& state,
6
const
Move
move){
7
const
Player
turn =
alt
(state.turn());
8
const
Square
opKingSquare = state.kingSquare(
alt
(turn));
9
10
// Capture Piece
11
if
(move.
capturePtype
())
12
return
true
;
13
14
// Add Effect for King's Neighboring8
15
if
(
Neighboring8Direct::hasEffect
(state,
newPtypeO
(turn, move.
ptype
()),
16
move.
to
(), opKingSquare) )
17
return
true
;
18
return
false
;
19
}
20
21
// ;;; Local Variables:
22
// ;;; mode:c++
23
// ;;; c-basic-offset:2
24
// ;;; End:
Generated on Sun Jul 21 2013 13:37:24 by
1.8.4