- void update(Piece p, Square to, Move m) { table[p][to] = m; }
- void update(Piece p, Square to, Value v) {
+ void update(Piece pc, Square to, Move m) {
+
+ if (m == table[pc][to].first)
+ return;
+
+ table[pc][to].second = table[pc][to].first;
+ table[pc][to].first = m;
+ }
+
+ void update(Piece pc, Square to, Value v) {