]> git.sesse.net Git - stockfish/commitdiff
Rename getters functions removing 'get_' prefix
authorMarco Costalba <mcostalba@gmail.com>
Sun, 25 Dec 2011 10:50:59 +0000 (11:50 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 25 Dec 2011 10:50:59 +0000 (11:50 +0100)
Follow the suggested Qt style:

http://doc.qt.nokia.com/qq/qq13-apis.html

It seems to me simpler and easier to read.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
16 files changed:
src/benchmark.cpp
src/book.cpp
src/endgame.cpp
src/evaluate.cpp
src/material.cpp
src/material.h
src/misc.cpp
src/misc.h
src/movepick.cpp
src/movepick.h
src/pawns.cpp
src/pawns.h
src/position.cpp
src/position.h
src/search.cpp
src/uci.cpp

index 9f32dbae3a2f3e6a1d2b0c76152c59090b6e59fb..876b270f23820d81ad84719edf1dd0cc9e30f471 100644 (file)
@@ -107,7 +107,7 @@ void benchmark(int argc, char* argv[]) {
 
   // Ok, let's start the benchmark !
   totalNodes = 0;
 
   // Ok, let's start the benchmark !
   totalNodes = 0;
-  time = get_system_time();
+  time = system_time();
 
   for (size_t i = 0; i < fenList.size(); i++)
   {
 
   for (size_t i = 0; i < fenList.size(); i++)
   {
@@ -131,7 +131,7 @@ void benchmark(int argc, char* argv[]) {
       }
   }
 
       }
   }
 
-  time = get_system_time() - time;
+  time = system_time() - time;
 
   cerr << "\n==============================="
        << "\nTotal time (ms) : " << time
 
   cerr << "\n==============================="
        << "\nTotal time (ms) : " << time
index 427ae56e677fdcc3532958d3f10c8ab653ae98ca..494c9c1121cfca0af4410ab249d7bd1c0b5e6456 100644 (file)
@@ -349,7 +349,7 @@ namespace {
 /// Book c'tor. Make random number generation less deterministic, for book moves
 Book::Book() : bookSize(0) {
 
 /// Book c'tor. Make random number generation less deterministic, for book moves
 Book::Book() : bookSize(0) {
 
-  for (int i = abs(get_system_time() % 10000); i > 0; i--)
+  for (int i = abs(system_time() % 10000); i > 0; i--)
       RKiss.rand<unsigned>();
 }
 
       RKiss.rand<unsigned>();
 }
 
index 8280131753b859ea1ea784230eb1abde1c23f7d8..d28772277f2f65af11451e2c6b3c203ee8774fa4 100644 (file)
@@ -87,7 +87,7 @@ namespace {
     fen += string(1, '0' + int(8 - keyCode.length())) + "/8/8/8/8/8/8/8 w - - 0 10";
 
     // Build a Position out of the fen string and get its material key
     fen += string(1, '0' + int(8 - keyCode.length())) + "/8/8/8/8/8/8/8 w - - 0 10";
 
     // Build a Position out of the fen string and get its material key
-    return Position(fen, false, 0).get_material_key();
+    return Position(fen, false, 0).material_key();
   }
 
 } // namespace
   }
 
 } // namespace
index 6d95fd58cb6cca53a1c968d7fbdaddf142f1e934..5d8d7b9902ec77fa1e1078e26b7e44725d44da7a 100644 (file)
@@ -288,7 +288,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
   margins[WHITE] = margins[BLACK] = VALUE_ZERO;
 
   // Probe the material hash table
   margins[WHITE] = margins[BLACK] = VALUE_ZERO;
 
   // Probe the material hash table
-  ei.mi = Threads[pos.thread()].materialTable.get_material_info(pos);
+  ei.mi = Threads[pos.thread()].materialTable.material_info(pos);
   score += ei.mi->material_value();
 
   // If we have a specialized evaluation function for the current material
   score += ei.mi->material_value();
 
   // If we have a specialized evaluation function for the current material
@@ -300,7 +300,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
   }
 
   // Probe the pawn hash table
   }
 
   // Probe the pawn hash table
-  ei.pi = Threads[pos.thread()].pawnTable.get_pawn_info(pos);
+  ei.pi = Threads[pos.thread()].pawnTable.pawn_info(pos);
   score += ei.pi->pawns_value();
 
   // Initialize attack and king safety bitboards
   score += ei.pi->pawns_value();
 
   // Initialize attack and king safety bitboards
index 27a88f86e67527c5d8851af6d4af9fb5583183cd..cf1019ac07cd3646c036499353556d50fce956e1 100644 (file)
@@ -90,15 +90,15 @@ void MaterialInfoTable::init() { Base::init(); if (!funcs) funcs = new Endgames(
 MaterialInfoTable::~MaterialInfoTable() { delete funcs; }
 
 
 MaterialInfoTable::~MaterialInfoTable() { delete funcs; }
 
 
-/// MaterialInfoTable::get_material_info() takes a position object as input,
+/// MaterialInfoTable::material_info() takes a position object as input,
 /// computes or looks up a MaterialInfo object, and returns a pointer to it.
 /// If the material configuration is not already present in the table, it
 /// is stored there, so we don't have to recompute everything when the
 /// same material configuration occurs again.
 
 /// computes or looks up a MaterialInfo object, and returns a pointer to it.
 /// If the material configuration is not already present in the table, it
 /// is stored there, so we don't have to recompute everything when the
 /// same material configuration occurs again.
 
-MaterialInfo* MaterialInfoTable::get_material_info(const Position& pos) const {
+MaterialInfo* MaterialInfoTable::material_info(const Position& pos) const {
 
 
-  Key key = pos.get_material_key();
+  Key key = pos.material_key();
   MaterialInfo* mi = probe(key);
 
   // If mi->key matches the position's material hash key, it means that we
   MaterialInfo* mi = probe(key);
 
   // If mi->key matches the position's material hash key, it means that we
index e33fc87bdf8c2ae8f590b64aba27b133c7ac7271..94c2d637e4e88a395b4a8c27152bb1ed8637fd08 100644 (file)
@@ -68,13 +68,13 @@ private:
 
 
 /// The MaterialInfoTable class represents a pawn hash table. The most important
 
 
 /// The MaterialInfoTable class represents a pawn hash table. The most important
-/// method is get_material_info, which returns a pointer to a MaterialInfo object.
+/// method is material_info(), which returns a pointer to a MaterialInfo object.
 
 class MaterialInfoTable : public SimpleHash<MaterialInfo, MaterialTableSize> {
 public:
   ~MaterialInfoTable();
   void init();
 
 class MaterialInfoTable : public SimpleHash<MaterialInfo, MaterialTableSize> {
 public:
   ~MaterialInfoTable();
   void init();
-  MaterialInfo* get_material_info(const Position& pos) const;
+  MaterialInfo* material_info(const Position& pos) const;
   static Phase game_phase(const Position& pos);
 
 private:
   static Phase game_phase(const Position& pos);
 
 private:
index 4d91c0fbb11ef8e4e2ba20a434b086400761e4e3..5912514c23dbadaf63133281c130497fe3a63a72 100644 (file)
@@ -134,9 +134,9 @@ void dbg_before() { dbg_hit_on(false); }
 void dbg_after()  { dbg_hit_on(true); dbg_hit_cnt0--; }
 
 
 void dbg_after()  { dbg_hit_on(true); dbg_hit_cnt0--; }
 
 
-/// get_system_time() returns the current system time, measured in milliseconds
+/// system_time() returns the current system time, measured in milliseconds
 
 
-int get_system_time() {
+int system_time() {
 
 #if defined(_MSC_VER)
   struct _timeb t;
 
 #if defined(_MSC_VER)
   struct _timeb t;
index 303514f7ffd2655a3e4c1dff2b36bab1f6ff3454..c5ca538755665280b8daa7f496bd27a65ca34bab 100644 (file)
@@ -28,7 +28,7 @@
 
 extern const std::string engine_name();
 extern const std::string engine_authors();
 
 extern const std::string engine_name();
 extern const std::string engine_authors();
-extern int get_system_time();
+extern int system_time();
 extern int cpu_count();
 extern void timed_wait(WaitCondition*, Lock*, int);
 extern void prefetch(char* addr);
 extern int cpu_count();
 extern void timed_wait(WaitCondition*, Lock*, int);
 extern void prefetch(char* addr);
index 589c27b3585383be0ac6823907f767b36696d36b..b992d2353041f69b1579c064904fc5b15ce28cb3 100644 (file)
@@ -232,7 +232,7 @@ void MovePicker::go_next_phase() {
 /// MovePicker::score_captures(), MovePicker::score_noncaptures() and
 /// MovePicker::score_evasions() assign a numerical move ordering score
 /// to each move in a move list.  The moves with highest scores will be
 /// MovePicker::score_captures(), MovePicker::score_noncaptures() and
 /// MovePicker::score_evasions() assign a numerical move ordering score
 /// to each move in a move list.  The moves with highest scores will be
-/// picked first by get_next_move().
+/// picked first by next_move().
 
 void MovePicker::score_captures() {
   // Winning and equal captures in the main search are ordered by MVV/LVA.
 
 void MovePicker::score_captures() {
   // Winning and equal captures in the main search are ordered by MVV/LVA.
@@ -300,14 +300,14 @@ void MovePicker::score_evasions() {
   }
 }
 
   }
 }
 
-/// MovePicker::get_next_move() is the most important method of the MovePicker
-/// class. It returns a new pseudo legal move every time it is called, until there
+/// MovePicker::next_move() is the most important method of the MovePicker class.
+/// It returns a new pseudo legal move every time it is called, until there
 /// are no more moves left. It picks the move with the biggest score from a list
 /// of generated moves taking care not to return the tt move if has already been
 /// searched previously. Note that this function is not thread safe so should be
 /// lock protected by caller when accessed through a shared MovePicker object.
 
 /// are no more moves left. It picks the move with the biggest score from a list
 /// of generated moves taking care not to return the tt move if has already been
 /// searched previously. Note that this function is not thread safe so should be
 /// lock protected by caller when accessed through a shared MovePicker object.
 
-Move MovePicker::get_next_move() {
+Move MovePicker::next_move() {
 
   Move move;
 
 
   Move move;
 
index b2a8dc98bbe1b38096b27f78a984620bb24a9ebd..9f2be29144e82b8b7a1c94d86e64bc4abc98d984 100644 (file)
@@ -28,7 +28,7 @@
 /// MovePicker is a class which is used to pick one pseudo legal move at a time
 /// from the current position. It is initialized with a Position object and a few
 /// moves we have reason to believe are good. The most important method is
 /// MovePicker is a class which is used to pick one pseudo legal move at a time
 /// from the current position. It is initialized with a Position object and a few
 /// moves we have reason to believe are good. The most important method is
-/// MovePicker::get_next_move(), which returns a new pseudo legal move each time
+/// MovePicker::next_move(), which returns a new pseudo legal move each time
 /// it is called, until there are no moves left, when MOVE_NONE is returned.
 /// In order to improve the efficiency of the alpha beta algorithm, MovePicker
 /// attempts to return the moves which are most likely to get a cut-off first.
 /// it is called, until there are no moves left, when MOVE_NONE is returned.
 /// In order to improve the efficiency of the alpha beta algorithm, MovePicker
 /// attempts to return the moves which are most likely to get a cut-off first.
@@ -41,7 +41,7 @@ public:
   MovePicker(const Position&, Move, Depth, const History&, Search::Stack*, Value);
   MovePicker(const Position&, Move, Depth, const History&, Square recaptureSq);
   MovePicker(const Position&, Move, const History&, PieceType parentCapture);
   MovePicker(const Position&, Move, Depth, const History&, Search::Stack*, Value);
   MovePicker(const Position&, Move, Depth, const History&, Square recaptureSq);
   MovePicker(const Position&, Move, const History&, PieceType parentCapture);
-  Move get_next_move();
+  Move next_move();
 
 private:
   void score_captures();
 
 private:
   void score_captures();
index 3aede5adfa7f111b42ddef9332e9182a5dfba8f5..2906b0453b3c8508ddeb3ce129a00152d9a5b1cd 100644 (file)
@@ -72,14 +72,14 @@ namespace {
 }
 
 
 }
 
 
-/// PawnInfoTable::get_pawn_info() takes a position object as input, computes
+/// PawnInfoTable::pawn_info() takes a position object as input, computes
 /// a PawnInfo object, and returns a pointer to it. The result is also stored
 /// in an hash table, so we don't have to recompute everything when the same
 /// pawn structure occurs again.
 
 /// a PawnInfo object, and returns a pointer to it. The result is also stored
 /// in an hash table, so we don't have to recompute everything when the same
 /// pawn structure occurs again.
 
-PawnInfo* PawnInfoTable::get_pawn_info(const Position& pos) const {
+PawnInfo* PawnInfoTable::pawn_info(const Position& pos) const {
 
 
-  Key key = pos.get_pawn_key();
+  Key key = pos.pawn_key();
   PawnInfo* pi = probe(key);
 
   // If pi->key matches the position's pawn hash key, it means that we
   PawnInfo* pi = probe(key);
 
   // If pi->key matches the position's pawn hash key, it means that we
index fec0395f43dbc39f4656d94c462aee2bf5a8d888..4d65bea2c4e11bffa81eff1702ae0477a0dd2485 100644 (file)
@@ -29,9 +29,9 @@ const int PawnTableSize = 16384;
 /// PawnInfo is a class which contains various information about a pawn
 /// structure. Currently, it only includes a middle game and an end game
 /// pawn structure evaluation, and a bitboard of passed pawns. We may want
 /// PawnInfo is a class which contains various information about a pawn
 /// structure. Currently, it only includes a middle game and an end game
 /// pawn structure evaluation, and a bitboard of passed pawns. We may want
-/// to add further information in the future. A lookup to the pawn hash table
-/// (performed by calling the get_pawn_info method in a PawnInfoTable object)
-/// returns a pointer to a PawnInfo object.
+/// to add further information in the future. A lookup to the pawn hash
+/// table (performed by calling the pawn_info method in a PawnInfoTable
+/// object) returns a pointer to a PawnInfo object.
 
 class PawnInfo {
 
 
 class PawnInfo {
 
@@ -63,11 +63,11 @@ private:
 
 
 /// The PawnInfoTable class represents a pawn hash table. The most important
 
 
 /// The PawnInfoTable class represents a pawn hash table. The most important
-/// method is get_pawn_info, which returns a pointer to a PawnInfo object.
+/// method is pawn_info, which returns a pointer to a PawnInfo object.
 
 class PawnInfoTable : public SimpleHash<PawnInfo, PawnTableSize> {
 public:
 
 class PawnInfoTable : public SimpleHash<PawnInfo, PawnTableSize> {
 public:
-  PawnInfo* get_pawn_info(const Position& pos) const;
+  PawnInfo* pawn_info(const Position& pos) const;
 
 private:
   template<Color Us>
 
 private:
   template<Color Us>
index 66890a5f5e2224473d81f4a20d6ab3b8b0937814..9a49501cda35ef004525061287281ffe66054893 100644 (file)
@@ -731,7 +731,7 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
   assert(&newSt != st);
 
   nodes++;
   assert(&newSt != st);
 
   nodes++;
-  Key key = st->key;
+  Key k = st->key;
 
   // Copy some fields of old state to our new StateInfo object except the ones
   // which are recalculated from scratch anyway, then switch our state pointer
 
   // Copy some fields of old state to our new StateInfo object except the ones
   // which are recalculated from scratch anyway, then switch our state pointer
@@ -750,7 +750,7 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
   st = &newSt;
 
   // Update side to move
   st = &newSt;
 
   // Update side to move
-  key ^= zobSideToMove;
+  k ^= zobSideToMove;
 
   // Increment the 50 moves rule draw counter. Resetting it to zero in the
   // case of non-reversible moves is taken care of later.
 
   // Increment the 50 moves rule draw counter. Resetting it to zero in the
   // case of non-reversible moves is taken care of later.
@@ -759,7 +759,7 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
 
   if (is_castle(m))
   {
 
   if (is_castle(m))
   {
-      st->key = key;
+      st->key = k;
       do_castle_move<true>(m);
       return;
   }
       do_castle_move<true>(m);
       return;
   }
@@ -820,7 +820,7 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
       pieceList[them][capture][pieceCount[them][capture]] = SQ_NONE;
 
       // Update hash keys
       pieceList[them][capture][pieceCount[them][capture]] = SQ_NONE;
 
       // Update hash keys
-      key ^= zobrist[them][capture][capsq];
+      k ^= zobrist[them][capture][capsq];
       st->materialKey ^= zobrist[them][capture][pieceCount[them][capture]];
 
       // Update incremental scores
       st->materialKey ^= zobrist[them][capture][pieceCount[them][capture]];
 
       // Update incremental scores
@@ -831,12 +831,12 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
   }
 
   // Update hash key
   }
 
   // Update hash key
-  key ^= zobrist[us][pt][from] ^ zobrist[us][pt][to];
+  k ^= zobrist[us][pt][from] ^ zobrist[us][pt][to];
 
   // Reset en passant square
   if (st->epSquare != SQ_NONE)
   {
 
   // Reset en passant square
   if (st->epSquare != SQ_NONE)
   {
-      key ^= zobEp[st->epSquare];
+      k ^= zobEp[st->epSquare];
       st->epSquare = SQ_NONE;
   }
 
       st->epSquare = SQ_NONE;
   }
 
@@ -844,13 +844,13 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
   if (    st->castleRights != CASTLES_NONE
       && (castleRightsMask[from] & castleRightsMask[to]) != ALL_CASTLES)
   {
   if (    st->castleRights != CASTLES_NONE
       && (castleRightsMask[from] & castleRightsMask[to]) != ALL_CASTLES)
   {
-      key ^= zobCastle[st->castleRights];
+      k ^= zobCastle[st->castleRights];
       st->castleRights &= castleRightsMask[from] & castleRightsMask[to];
       st->castleRights &= castleRightsMask[from] & castleRightsMask[to];
-      key ^= zobCastle[st->castleRights];
+      k ^= zobCastle[st->castleRights];
   }
 
   // Prefetch TT access as soon as we know key is updated
   }
 
   // Prefetch TT access as soon as we know key is updated
-  prefetch((char*)TT.first_entry(key));
+  prefetch((char*)TT.first_entry(k));
 
   // Move the piece
   Bitboard move_bb = make_move_bb(from, to);
 
   // Move the piece
   Bitboard move_bb = make_move_bb(from, to);
@@ -874,7 +874,7 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
           && (attacks_from<PAWN>(from + pawn_push(us), us) & pieces(PAWN, them)))
       {
           st->epSquare = Square((from + to) / 2);
           && (attacks_from<PAWN>(from + pawn_push(us), us) & pieces(PAWN, them)))
       {
           st->epSquare = Square((from + to) / 2);
-          key ^= zobEp[st->epSquare];
+          k ^= zobEp[st->epSquare];
       }
 
       if (is_promotion(m))
       }
 
       if (is_promotion(m))
@@ -899,7 +899,7 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
           pieceList[us][promotion][index[to]] = to;
 
           // Update hash keys
           pieceList[us][promotion][index[to]] = to;
 
           // Update hash keys
-          key ^= zobrist[us][PAWN][to] ^ zobrist[us][promotion][to];
+          k ^= zobrist[us][PAWN][to] ^ zobrist[us][promotion][to];
           st->pawnKey ^= zobrist[us][PAWN][to];
           st->materialKey ^=  zobrist[us][promotion][pieceCount[us][promotion]++]
                             ^ zobrist[us][PAWN][pieceCount[us][PAWN]];
           st->pawnKey ^= zobrist[us][PAWN][to];
           st->materialKey ^=  zobrist[us][promotion][pieceCount[us][promotion]++]
                             ^ zobrist[us][PAWN][pieceCount[us][PAWN]];
@@ -930,7 +930,7 @@ void Position::do_move(Move m, StateInfo& newSt, const CheckInfo& ci, bool moveI
   st->capturedType = capture;
 
   // Update the key with the final value
   st->capturedType = capture;
 
   // Update the key with the final value
-  st->key = key;
+  st->key = k;
 
   // Update checkers bitboard, piece must be already moved
   st->checkersBB = 0;
 
   // Update checkers bitboard, piece must be already moved
   st->checkersBB = 0;
index e1bdf39e2b5bbbbf7c398016301672cebd17ab4a..989694becc2ba1b97c133881863a39b7b6ac1cd8 100644 (file)
@@ -173,10 +173,10 @@ public:
   int see_sign(Move m) const;
 
   // Accessing hash keys
   int see_sign(Move m) const;
 
   // Accessing hash keys
-  Key get_key() const;
-  Key get_exclusion_key() const;
-  Key get_pawn_key() const;
-  Key get_material_key() const;
+  Key key() const;
+  Key exclusion_key() const;
+  Key pawn_key() const;
+  Key material_key() const;
 
   // Incremental evaluation
   Score value() const;
 
   // Incremental evaluation
   Score value() const;
@@ -394,19 +394,19 @@ inline bool Position::pawn_is_passed(Color c, Square s) const {
   return !(pieces(PAWN, flip(c)) & passed_pawn_mask(c, s));
 }
 
   return !(pieces(PAWN, flip(c)) & passed_pawn_mask(c, s));
 }
 
-inline Key Position::get_key() const {
+inline Key Position::key() const {
   return st->key;
 }
 
   return st->key;
 }
 
-inline Key Position::get_exclusion_key() const {
+inline Key Position::exclusion_key() const {
   return st->key ^ zobExclusion;
 }
 
   return st->key ^ zobExclusion;
 }
 
-inline Key Position::get_pawn_key() const {
+inline Key Position::pawn_key() const {
   return st->pawnKey;
 }
 
   return st->pawnKey;
 }
 
-inline Key Position::get_material_key() const {
+inline Key Position::material_key() const {
   return st->materialKey;
 }
 
   return st->materialKey;
 }
 
index 639cd02a4067d1e3c3df4c30236dacb44234a729..4cf8f47122e5143bed143abbf9c1e876a38844d7 100644 (file)
@@ -190,7 +190,7 @@ namespace {
     MovePickerExt(const Position& p, Move ttm, Depth d, const History& h, Stack* ss, Value b)
                   : MovePicker(p, ttm, d, h, ss, b), mp(ss->sp->mp) {}
 
     MovePickerExt(const Position& p, Move ttm, Depth d, const History& h, Stack* ss, Value b)
                   : MovePicker(p, ttm, d, h, ss, b), mp(ss->sp->mp) {}
 
-    Move get_next_move() { return mp->get_next_move(); }
+    Move next_move() { return mp->next_move(); }
     MovePicker* mp;
   };
 
     MovePicker* mp;
   };
 
@@ -653,7 +653,7 @@ namespace {
     // We don't want the score of a partial search to overwrite a previous full search
     // TT value, so we use a different position key in case of an excluded move.
     excludedMove = ss->excludedMove;
     // We don't want the score of a partial search to overwrite a previous full search
     // TT value, so we use a different position key in case of an excluded move.
     excludedMove = ss->excludedMove;
-    posKey = excludedMove ? pos.get_exclusion_key() : pos.get_key();
+    posKey = excludedMove ? pos.exclusion_key() : pos.key();
     tte = TT.probe(posKey);
     ttMove = RootNode ? RootMoves[PVIdx].pv[0] : tte ? tte->move() : MOVE_NONE;
 
     tte = TT.probe(posKey);
     ttMove = RootNode ? RootMoves[PVIdx].pv[0] : tte ? tte->move() : MOVE_NONE;
 
@@ -816,7 +816,7 @@ namespace {
         MovePicker mp(pos, ttMove, H, pos.captured_piece_type());
         CheckInfo ci(pos);
 
         MovePicker mp(pos, ttMove, H, pos.captured_piece_type());
         CheckInfo ci(pos);
 
-        while ((move = mp.get_next_move()) != MOVE_NONE)
+        while ((move = mp.next_move()) != MOVE_NONE)
             if (pos.pl_move_is_legal(move, ci.pinned))
             {
                 pos.do_move(move, st, ci, pos.move_gives_check(move, ci));
             if (pos.pl_move_is_legal(move, ci.pinned))
             {
                 pos.do_move(move, st, ci, pos.move_gives_check(move, ci));
@@ -867,7 +867,7 @@ split_point_start: // At split points actual search starts from here
     // Step 11. Loop through moves
     // Loop through all pseudo-legal moves until no moves remain or a beta cutoff occurs
     while (   bestValue < beta
     // Step 11. Loop through moves
     // Loop through all pseudo-legal moves until no moves remain or a beta cutoff occurs
     while (   bestValue < beta
-           && (move = mp.get_next_move()) != MOVE_NONE
+           && (move = mp.next_move()) != MOVE_NONE
            && !thread.cutoff_occurred())
     {
       assert(is_ok(move));
            && !thread.cutoff_occurred())
     {
       assert(is_ok(move));
@@ -1220,7 +1220,7 @@ split_point_start: // At split points actual search starts from here
 
     // Transposition table lookup. At PV nodes, we don't use the TT for
     // pruning, but only for move ordering.
 
     // Transposition table lookup. At PV nodes, we don't use the TT for
     // pruning, but only for move ordering.
-    tte = TT.probe(pos.get_key());
+    tte = TT.probe(pos.key());
     ttMove = (tte ? tte->move() : MOVE_NONE);
 
     if (!PvNode && tte && can_return_tt(tte, ttDepth, beta, ss->ply))
     ttMove = (tte ? tte->move() : MOVE_NONE);
 
     if (!PvNode && tte && can_return_tt(tte, ttDepth, beta, ss->ply))
@@ -1252,7 +1252,7 @@ split_point_start: // At split points actual search starts from here
         if (bestValue >= beta)
         {
             if (!tte)
         if (bestValue >= beta)
         {
             if (!tte)
-                TT.store(pos.get_key(), value_to_tt(bestValue, ss->ply), VALUE_TYPE_LOWER, DEPTH_NONE, MOVE_NONE, ss->eval, evalMargin);
+                TT.store(pos.key(), value_to_tt(bestValue, ss->ply), VALUE_TYPE_LOWER, DEPTH_NONE, MOVE_NONE, ss->eval, evalMargin);
 
             return bestValue;
         }
 
             return bestValue;
         }
@@ -1273,7 +1273,7 @@ split_point_start: // At split points actual search starts from here
 
     // Loop through the moves until no moves remain or a beta cutoff occurs
     while (   bestValue < beta
 
     // Loop through the moves until no moves remain or a beta cutoff occurs
     while (   bestValue < beta
-           && (move = mp.get_next_move()) != MOVE_NONE)
+           && (move = mp.next_move()) != MOVE_NONE)
     {
       assert(is_ok(move));
 
     {
       assert(is_ok(move));
 
@@ -1373,7 +1373,7 @@ split_point_start: // At split points actual search starts from here
     vt   = bestValue <= oldAlpha ? VALUE_TYPE_UPPER
          : bestValue >= beta ? VALUE_TYPE_LOWER : VALUE_TYPE_EXACT;
 
     vt   = bestValue <= oldAlpha ? VALUE_TYPE_UPPER
          : bestValue >= beta ? VALUE_TYPE_LOWER : VALUE_TYPE_EXACT;
 
-    TT.store(pos.get_key(), value_to_tt(bestValue, ss->ply), vt, ttDepth, move, ss->eval, evalMargin);
+    TT.store(pos.key(), value_to_tt(bestValue, ss->ply), vt, ttDepth, move, ss->eval, evalMargin);
 
     assert(bestValue > -VALUE_INFINITE && bestValue < VALUE_INFINITE);
 
 
     assert(bestValue > -VALUE_INFINITE && bestValue < VALUE_INFINITE);
 
@@ -1602,9 +1602,9 @@ split_point_start: // At split points actual search starts from here
     static int searchStartTime;
 
     if (reset)
     static int searchStartTime;
 
     if (reset)
-        searchStartTime = get_system_time();
+        searchStartTime = system_time();
 
 
-    return get_system_time() - searchStartTime;
+    return system_time() - searchStartTime;
   }
 
 
   }
 
 
@@ -1768,7 +1768,7 @@ split_point_start: // At split points actual search starts from here
     static RKISS rk;
 
     // PRNG sequence should be not deterministic
     static RKISS rk;
 
     // PRNG sequence should be not deterministic
-    for (int i = abs(get_system_time() % 50); i > 0; i--)
+    for (int i = abs(system_time() % 50); i > 0; i--)
         rk.rand<unsigned>();
 
     // RootMoves are already sorted by score in descending order
         rk.rand<unsigned>();
 
     // RootMoves are already sorted by score in descending order
@@ -1821,7 +1821,7 @@ split_point_start: // At split points actual search starts from here
     pv.push_back(m);
     pos.do_move(m, *st++);
 
     pv.push_back(m);
     pos.do_move(m, *st++);
 
-    while (   (tte = TT.probe(pos.get_key())) != NULL
+    while (   (tte = TT.probe(pos.key())) != NULL
            && tte->move() != MOVE_NONE
            && pos.is_pseudo_legal(tte->move())
            && pos.pl_move_is_legal(tte->move(), pos.pinned_pieces())
            && tte->move() != MOVE_NONE
            && pos.is_pseudo_legal(tte->move())
            && pos.pl_move_is_legal(tte->move(), pos.pinned_pieces())
@@ -1853,7 +1853,7 @@ split_point_start: // At split points actual search starts from here
     assert(pv[ply] != MOVE_NONE && pos.is_pseudo_legal(pv[ply]));
 
     do {
     assert(pv[ply] != MOVE_NONE && pos.is_pseudo_legal(pv[ply]));
 
     do {
-        k = pos.get_key();
+        k = pos.key();
         tte = TT.probe(k);
 
         // Don't overwrite existing correct entries
         tte = TT.probe(k);
 
         // Don't overwrite existing correct entries
@@ -1971,9 +1971,9 @@ void do_timer_event() {
   static int lastInfoTime;
   int e = elapsed_time();
 
   static int lastInfoTime;
   int e = elapsed_time();
 
-  if (get_system_time() - lastInfoTime >= 1000 || !lastInfoTime)
+  if (system_time() - lastInfoTime >= 1000 || !lastInfoTime)
   {
   {
-      lastInfoTime = get_system_time();
+      lastInfoTime = system_time();
 
       dbg_print_mean();
       dbg_print_hit_rate();
 
       dbg_print_mean();
       dbg_print_hit_rate();
index 559f8788ec12129a1df2a25d030b52d1e839f333..b875eaf7f1840bd3d3b41553dbeed55538dc1730 100644 (file)
@@ -117,9 +117,9 @@ void uci_loop() {
       }
 
       else if (token == "key")
       }
 
       else if (token == "key")
-          cout << "key: " << hex     << pos.get_key()
-               << "\nmaterial key: " << pos.get_material_key()
-               << "\npawn key: "     << pos.get_pawn_key() << endl;
+          cout << "key: " << hex     << pos.key()
+               << "\nmaterial key: " << pos.material_key()
+               << "\npawn key: "     << pos.pawn_key() << endl;
 
       else if (token == "uci")
           cout << "id name "     << engine_name()
 
       else if (token == "uci")
           cout << "id name "     << engine_name()
@@ -251,11 +251,11 @@ namespace {
     if (!(is >> depth))
         return;
 
     if (!(is >> depth))
         return;
 
-    time = get_system_time();
+    time = system_time();
 
     int64_t n = Search::perft(pos, depth * ONE_PLY);
 
 
     int64_t n = Search::perft(pos, depth * ONE_PLY);
 
-    time = get_system_time() - time;
+    time = system_time() - time;
 
     std::cout << "\nNodes " << n
               << "\nTime (ms) " << time
 
     std::cout << "\nNodes " << n
               << "\nTime (ms) " << time