void CLazyScraper::DoScrape() { bool full_scrape_needed = false; bool opponents_cards_scraped = false; write_log(3, "CLazyScraper::DoScrape()\n"); if (prefs.lazy_scraping_always_complete()) { full_scrape_needed = true; } if (prefs.lazy_scraping_when_sitin_sitout_leave() && p_autoplayer->TimeToHandleSitinSitoutLeave()) { full_scrape_needed = true; } // Scrape action-buttons to decide, if it is our turn // If it is our turn we have to do of course a full scrape p_scraper->ScrapeActionButtons(); if (IsMyTurn()) { full_scrape_needed = true; } if (full_scrape_needed || prefs.lazy_scraping_when_we_hold_cards()) { if (p_symbols->user_chair_confirmed()) { p_scraper->ScrapeHeroesCards(); } else { // scrape all cards, hoping to detect the userchair p_scraper->ScrapeAllCards(); opponents_cards_scraped = true; } } if (prefs.lazy_scraping_when_we_hold_cards() && HeroesCardsKnown()) { full_scrape_needed = true; } if (full_scrape_needed) { printf("Full scrape needed.\n"); //!!! write_log(3, "CLazyScraper: Full Scrape needed.\n"); if (!opponents_cards_scraped) { p_scraper->ScrapeOpponentsCards(); } p_scraper->CompleteBasicScrapeToFullScrape(); } else { write_log(3, "CLazyScraper: No full Scrape needed. Exiting early.\n"); } }
bool CLazyScraper::CompleteScrapeNeeded() { return (IsMyTurn() || (HaveCards() && (preferences.lazy_scraping_when_to_scrape() == k_lazy_scraping_cards)) || (preferences.lazy_scraping_when_to_scrape() == k_lazy_scraping_always)); }
bool CLazyScraper::CardScrapeNeeded() { return (IsMyTurn() || (preferences.lazy_scraping_when_to_scrape() == k_lazy_scraping_cards) || (preferences.lazy_scraping_when_to_scrape() == k_lazy_scraping_always)); }