/usr/include/osl/eval/ppair/piecePairWithStand.tcc is in libosl-dev 0.6.0-3.3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 | /* piecePairWithStand.tcc
*/
#ifndef EVAL_PPAIR_PIECEPAIRWITHSTAND_TCC
#define EVAL_PPAIR_PIECEPAIRWITHSTAND_TCC
#include "osl/eval/ppair/piecePairWithStand.h"
#include "osl/container/pieceValues.h"
template <class Table>
void osl::eval::ppair::PiecePairWithStand<Table>::
setValues(const SimpleState& state, container::PieceValues& values)
{
base_t::setValues(state, values);
// 速度は無視
for (int i=0; i<Piece::SIZE; i++)
{
const Piece piece = state.pieceOf(i);
values[i] += Table::Piece_Value.value(piece.ptypeO());
if (piece.isOnBoard())
continue;
assert(isBasic(piece.ptype()));
if (isMajorBasic(piece.ptype()))
{
values[i] += Table::Piece_Value.value(newPtypeO(piece.owner(), PAWN));
}
}
}
template <class Table>
int osl::eval::ppair::PiecePairWithStand<Table>::
standBonus(const SimpleState& state)
{
int result = 0;
for (int i=0; i<Piece::SIZE; i++)
{
const Piece piece = state.pieceOf(i);
if (piece.isOnBoard())
continue;
result += standBonus(piece.ptypeO());
}
return result;
}
template <class Table>
osl::eval::ppair::PiecePairWithStand<Table>::
PiecePairWithStand(const SimpleState& state)
: base_t(state)
{
for (int i=0; i<Piece::SIZE; i++)
{
const Piece piece = state.pieceOf(i);
base_t::val += Table::Piece_Value.value(piece.ptypeO());
}
base_t::val += standBonus(state);
}
#endif /* EVAL_PPAIR_PIECEPAIRWITHSTAND_TCC */
// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End:
|