- killers[0].move = ss->killers[0];
- killers[1].move = ss->killers[1];
- killers[2].move = killers[3].move = MOVE_NONE;
- killers[4].move = killers[5].move = MOVE_NONE;
-
- // In SMP case countermoves[] and followupmoves[] could have duplicated entries
- // in rare cases (less than 1 out of a million). This is harmless.
-
- // Be sure countermoves and followupmoves are different from killers
- for (int i = 0; i < 2; ++i)
- if ( countermoves[i] != killers[0].move
- && countermoves[i] != killers[1].move)
- (endMoves++)->move = countermoves[i];
-
- for (int i = 0; i < 2; ++i)
- if ( followupmoves[i] != killers[0].move
- && followupmoves[i] != killers[1].move
- && followupmoves[i] != killers[2].move
- && followupmoves[i] != killers[3].move)
- (endMoves++)->move = followupmoves[i];
+ killers[0] = ss->killers[0];
+ killers[1] = ss->killers[1];
+ killers[2].move = MOVE_NONE;
+
+ // Be sure countermoves are different from killers
+ if ( countermove != killers[0]
+ && countermove != killers[1])
+ *endMoves++ = countermove;