private boolean test_trap_precondition(GameState game, int trap_id) {

    trap_precondition_calls++;

    // If enemy elephant is touching trap, NO CAPTURES POSSIBLE!
    if ((TOUCH_TRAP[trap_id] & game.piece_bb[10 + game.enemy]) != 0) {
      trap_precondition_false++;
      return false;
    }

    // If 3 e pieces touch trap, NO CAPTURES POSSIBLE
    long e_touch_bb = game.colour_bb[game.enemy] & TOUCH_TRAP[trap_id];
    int e_touch = Util.PopCnt(e_touch_bb);
    if (e_touch >= 3) {
      trap_precondition_false++;
      return false;
    }

    // If 1 non dominated e piece touch trap
    // AND any other epiece touch trap, NO CAPTURE POSSIBLE
    long e_touch_non_dominated_bb = (e_touch_bb & ~game.dominated_pieces_bb);
    int e_touch_non_dominated = Util.PopCnt(e_touch_non_dominated_bb);
    if (e_touch_non_dominated >= 1 && e_touch >= 2) {
      trap_precondition_false++;
      return false;
    }

    if (game.getStepsRemaining() <= 3) {
      // If no epieces touch trap, NO CAPTURES POSSIBLE
      if (e_touch == 0) {
        trap_precondition_false++;
        return false;
      }

      // If two epieces touch trap, NO CAPTURES POSSIBLE
      if (e_touch >= 2) {
        trap_precondition_false++;
        return false;
      }

      // If one non=dominated epiece touch trap, NO CAPTURES POSSIBLE
      if (e_touch_non_dominated >= 1) {
        trap_precondition_false++;
        return false;
      }
    }

    return true;
  }