Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "PokemonLZA/Inference/PokemonLZA_SelectionArrowDetector.h"
#include "PokemonLZA/Inference/PokemonLZA_DialogDetector.h"
#include "PokemonLZA_StallBuyer.h"
#include <array>

namespace PokemonAutomation{
namespace NintendoSwitch{
Expand Down Expand Up @@ -122,7 +123,8 @@ int detect_stall_amount_item(SingleSwitchProgramEnvironment& env, StallBuyer_Des
bool is_five_item_stall = five_item_stall_detector.detect(snapshot);
bool is_two_item_stall = two_item_stall_detector.detect(snapshot);

int count = is_seven_item_stall + is_six_item_stall + is_five_item_stall + is_two_item_stall;
std::array<bool, 4> array = {is_seven_item_stall, is_six_item_stall, is_five_item_stall, is_two_item_stall};
auto count = std::count(array.begin(), array.end(), true);
if (count == 1){
// Exactly one kind of stall detected
if (is_seven_item_stall){
Expand Down
Loading