From e1f4036ff84e4b6c181582a9d249087ace6c1d6f Mon Sep 17 00:00:00 2001 From: StarlitGhost <679547+StarlitGhost@users.noreply.github.com> Date: Wed, 4 Dec 2024 10:52:35 +0000 Subject: [PATCH] [2024/4] refactor to use Grid.find_all() - it does the row/col enumeration and position building already --- .aoc_tiles/tiles/2024/04.png | Bin 5420 -> 5470 bytes 2024/4/script.py | 23 ++++++----------------- README.md | 4 ++-- 3 files changed, 8 insertions(+), 19 deletions(-) diff --git a/.aoc_tiles/tiles/2024/04.png b/.aoc_tiles/tiles/2024/04.png index 9cb818d13902cd3329008ad2469cfe2032d41b8d..898e925650448eb3e4be9b6c1b003ae990722ec9 100644 GIT binary patch literal 5470 zcmV-k6`|^hP) zc~}$I-p5ZS3rPrD*n=P_d! z>$Tcy)mvM&ixhXEDvBZqf-II*P<9AQ5<<53kEzLIGMUT_Fqsg(fB4ABOg?kYd~@cU zGw1vcEAH*1fU4wjIpuSOLg6rX2y-E;Q0=Xh?T|~+ST>s5VJ>Z4D#o(i+zxYT<8qLx zpRGtqijW{v`qbLiE_qdB=h^(4%)50ejn<}fJItkx%fUGg0Knrw60t}k7EO-yt7wp} z+kdHoDwqkm?I*YR%N0>;zSjTwY+~p~uRe)7MX6GE%KNGsq(u+f&fKo9Z|gDr+CVSo zbqiwSLwx`MN3%+IoxX$5B_)QGvsq(lwK}C*%X}I z0ND2GWEV$=!Q(QjoGm;GwOZZvvPYkuy!qkdIzKkVCo;gJA~}+PYZ(g^NE)uW9ZA0Q|CPzOS1joVe*o_W3)t zrgWPt<&p=jj(nc4Sj6KPdPT`mBc{g$Tr7AncwE3RR{hvjz;eG&s zKyR0m8yCF%RFp(4a^P|z13bQ1Gh@mVBZyFm$QDa^)t*bwf091ugP(HB8<6R<$B!CR zE(6Qig0Wz#O08|_G~gxfA{GmLwsM-Mi{X2r=L$$T^l(671`? z=k=N1j~{T9Ws9YZ5*sr5QE}KT0Kl#LjQ{|ZT04MTX1WUC)L0sgM*n|TM+ao9v!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