This file is indexed.

/usr/include/osl/ntesuki/ntesukiSimulationSearcher.h is in libosl-dev 0.4.2-1.

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
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
/* ntesukiSimulationSearcher.h
 */
#ifndef __NTESUKI_SIMULATION_SEARCHER_H
#define __NTESUKI_SIMULATION_SEARCHER_H
#include "osl/ntesuki/ntesukiTable.h"
#include "osl/ntesuki/ntesukiMoveGenerator.h"
#include "ntesukiExceptions.h"

typedef osl::state::NumEffectState state_t;

namespace osl
{
  namespace ntesuki
  {
    class
    NtesukiSimulationSearcher
    {
      /** 現在までに何ノード読んだか */
      unsigned int node_count;
      /** 経過をどこまで表示するか */
      bool verbose;

      /** Simulation 結果の統計 */
      unsigned int proof_count;
      unsigned int proof_success_count;
      unsigned int light_proof_success_count;
      unsigned int disproof_count;
      unsigned int disproof_success_count;
    public:
      bool debug;
    private:
      NtesukiResult result;
      state_t& state;
      NtesukiMoveGenerator *mg;
      PathEncoding& path;
      NtesukiTable& table;
      NtesukiRecord::ISScheme isscheme;

      /*
       * helpers
       */
      template <class Searcher, Player P> class AttackHelperProof;
      template <class Searcher, Player P> class DefenseHelperProof;
      template <class Searcher, Player P> class AttackHelperDisproof;
      template <class Searcher, Player P> class DefenseHelperDisproof;

      /* Utilities
       */
      template<Player P>
      bool
      isSafeMove(const Move move,
		 int pass_left);

      template <Player P>
      Move
      adjustMove(Move candidate) const
      {
	assert(candidate.isValid());
	if (! candidate.isDrop())
	{
	  const Piece p=state.pieceOnBoard(candidate.to());
	  candidate=setCapture(candidate,p);
	}
	return candidate;
      }
      
      /**
       * Proof 攻撃に関する計算
       */
      template <Player P>
      void attackForProof(NtesukiRecord* record,
			  const NtesukiRecord* record_orig,
			  const unsigned int passLeft,
			  const Move last_move);
      /**
       * Disproof 防御に関する計算
       */
      template <Player P>
      void defenseForProof(NtesukiRecord* record,
			   const NtesukiRecord* record_orig,
			   const unsigned int passLeft,
			   const Move last_move);
      /**
       * Disproof 攻撃に関する計算
       */
      template <Player P>
      void attackForDisproof(NtesukiRecord* record,
			     const NtesukiRecord* record_orig,
			     const unsigned int passLeft,
			     const Move last_move);
      /**
       * Disproof 防御に関する計算
       */
      template <Player P>
      void defenseForDisproof(NtesukiRecord* record,
			      const NtesukiRecord* record_orig,
			      const unsigned int passLeft,
			      const Move last_move);

    public:
      NtesukiSimulationSearcher(state_t& state,
				NtesukiMoveGenerator *mg,
				PathEncoding& path,
				NtesukiTable& table,
				NtesukiRecord::ISScheme isscheme,
				bool verbose = false);
      ~NtesukiSimulationSearcher();

      /**
       * Start simulation to proof, P as Attacker.
       * @return true, if checkmate is proven
       */
      template <Player P>
      bool
      startFromAttackProof(NtesukiRecord* record,
			   const NtesukiRecord* record_orig,
			   const unsigned int passLeft,
			   const Move last_move);

      /**
       * Start simulation to proof, P as Defender.
       * @return true, if checkmate is proven
       */
      template <Player P>
      bool
      startFromDefenseProof(NtesukiRecord* record,
			    const NtesukiRecord* record_orig,
			    const unsigned int passLeft,
			    const Move last_move);

      /**
       * Start simulation to disproof, P as Attacker.
       * @return true, if nocheckmate is proven
       */
      template <Player P>
      bool
      startFromAttackDisproof(NtesukiRecord* record,
			      const NtesukiRecord* record_orig,
			      const unsigned int passLeft,
			      const Move last_move);

      /**
       * Start simulation to disproof, P as Defender.
       * @return true, if nocheckmate is proven
       */
      template <Player P>
      bool
      startFromDefenseDisproof(NtesukiRecord* record,
			       const NtesukiRecord* record_orig,
			       const unsigned int passLeft,
			       const Move last_move);

      unsigned int nodeCount() const { return node_count; }
    };
  } //ntesuki
} //osl
#endif /* _NTESUKI_SIMULATION_SEARCHER_H */

// ;;; Local Variables:
// ;;; mode:c++
// ;;; c-basic-offset:2
// ;;; End: