Skip to content
Snippets Groups Projects
Commit 3683dbca authored by Taddeüs Kroes's avatar Taddeüs Kroes
Browse files

Fix exa detection when exa is crushed lower

parent 087df026
No related branches found
No related tags found
No related merge requests found
......@@ -28,7 +28,7 @@ MIN_BASIC_SAT = 180
MIN_BOMB_SAT = 130
DETECT_EXA_X = 30
DETECT_EXA_Y = 547
DETECT_EXA_Y = 547, 555
EXA_HUE = 129
EXA_MIN_VAL = 194
DETECT_HELD_Y = 579
......@@ -115,10 +115,10 @@ def detect_blocks(board):
def detect_exa(board):
for col in range(COLUMNS):
x = col * BLOCK_SIZE + DETECT_EXA_X
y = DETECT_EXA_Y + COLUMN_VSHIFT[col]
h, s, v = board.getpixel((x, y))
if is_hue(h, EXA_HUE) and v >= EXA_MIN_VAL:
return col
for y in DETECT_EXA_Y:
h, s, v = board.getpixel((x, y + COLUMN_VSHIFT[col]))
if is_hue(h, EXA_HUE) and v >= EXA_MIN_VAL:
return col
def detect_held(board, exa):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment