This file is indexed.

/usr/include/osl/rating/feature/capture.h is in libosl-dev 0.8.0-1.4.

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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
/* capture.h
 */
#ifndef _CAPTURE_H
#define _CAPTURE_H

#include "osl/rating/feature.h"
#include "osl/eval/see.h"
#include "osl/effect_util/shadowEffect.h"
#include "osl/additionalEffect.h"

namespace osl
{
  namespace rating
  {
    class Capture : public Feature
    {
    public:
      enum { INF = 999999 };
    private:
      int first, last;
      static const std::string name(int first, int last);
    public:
      Capture(int f, int l) : Feature(name(f, l)), first(f), last(l) {}
      static int see(const NumEffectState& state, Move move, const RatingEnv& env)
      {
	int see = See::see(state, move, env.my_pin, env.op_pin);
	see = see*100/128;
	return see;
      }
      bool match(const NumEffectState& state, Move move, const RatingEnv& env) const
      {
	int see = this->see(state, move, env);
	return first <= see && see < last;
      }
    };

    class ShadowEffect1 : public Feature
    {
    public:
      ShadowEffect1() : Feature("ShadowEffect1") {}
      bool match(const NumEffectState& state, Move move, const RatingEnv&) const
      {
	return ShadowEffect::count2(state, move.to(), move.player()) == 1;
      }
    };

    class ShadowEffect2 : public Feature
    {
    public:
      ShadowEffect2() : Feature("ShadowEffect2") {}
      bool match(const NumEffectState& state, Move move, const RatingEnv&) const
      {
	return ShadowEffect::count2(state, move.to(), move.player()) == 2;
      }
    };

    class ContinueCapture : public Feature
    {
    public:
      ContinueCapture() : Feature("Cont.C") {}
      bool match(const NumEffectState&, Move move, const RatingEnv& env) const
      {
	return env.history.hasLastMove(2) && env.history.lastMove(2).to() == move.from()
	  && move.capturePtype() != PTYPE_EMPTY;
      }
    };

    /** 取った駒をすぐ使う */
    class DropCaptured : public Feature
    {
      Ptype ptype;
    public:
      DropCaptured(Ptype ptype);
      bool match(const NumEffectState&, Move move, const RatingEnv& env) const
      {
	return move.isDrop() && move.ptype() == ptype
	  && env.history.hasLastMove(2) && env.history.lastMove(2).isNormal()
	  && env.history.lastMove(2).capturePtype() != PTYPE_EMPTY
	  && unpromote(env.history.lastMove(2).capturePtype()) == ptype;
      }
    };

  }
}


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