Skip to content

Commit 14505ab

Browse files
author
Gin
committed
writing checking fossils in box
1 parent 9ecd3db commit 14505ab

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

SerialPrograms/Source/PokemonLZA/Programs/PokemonLZA_AutoFossil.cpp

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
#include "PokemonLZA/Inference/PokemonLZA_SelectionArrowDetector.h"
1414
#include "PokemonLZA/Inference/PokemonLZA_DialogDetector.h"
1515
#include "PokemonLZA/Programs/PokemonLZA_MenuNavigation.h"
16+
#include "PokemonLZA/Inference/Boxes/PokemonLZA_BoxDetection.h"
1617
#include "PokemonLZA_AutoFossil.h"
1718

1819
#include <sstream>
@@ -162,7 +163,14 @@ void AutoFossil::revive_one_fossil(SingleSwitchProgramEnvironment& env, ProContr
162163
}
163164
}
164165

165-
166+
// start at box system, check fossils one by one
167+
void AutoFossil::check_fossils_in_box(SingleSwitchProgramEnvironment& env, ProControllerContext& context, size_t num_boxes){
168+
uint8_t box_x = 0, box_y = 0;
169+
BoxDetector box_detector(COLOR_RED, &env.console.overlay());
170+
for(size_t i = 0; i < 30; i++){
171+
box_detector.move_cursor(env.program_info(), env.console, context, box_x, box_y);
172+
}
173+
}
166174

167175
}
168176
}

SerialPrograms/Source/PokemonLZA/Programs/PokemonLZA_AutoFossil.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ class AutoFossil : public SingleSwitchProgramInstance{
3333

3434
private:
3535
void revive_one_fossil(SingleSwitchProgramEnvironment& env, ProControllerContext& context);
36+
37+
void check_fossils_in_box(SingleSwitchProgramEnvironment& env, ProControllerContext& context, size_t num_boxes);
3638
};
3739

3840

0 commit comments

Comments
 (0)