From 2cf8527c4ff2b39899e3c6aeaa7c4810ea23fcaf Mon Sep 17 00:00:00 2001 From: Keenan Tims Date: Sun, 15 Dec 2024 23:21:52 -0800 Subject: [PATCH] grid: add add_mut() --- .aoc_tiles/tiles/2024/16.png | Bin 7349 -> 9033 bytes README.md | 2 +- utils/grid/lib.rs | 6 ++++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/.aoc_tiles/tiles/2024/16.png b/.aoc_tiles/tiles/2024/16.png index f5551a13e4ecad1cc2e522a935128351c86b6c23..2e96a984a2bac27c7e3a74fab37120cbc1319d50 100644 GIT binary patch literal 9033 zcmX9^1ymH>+aJo8Qo4~+xV@`Pk!QWA<7*zbpXY8L7IG zf>B_>VQ7FC<3b*4!P|$)`cV`kzEA|#guWJel#*t)PAj{4a-#=gtkcBb-@L^n*!XrB zhW-tAse@Zw!UtjQquKW38rf?46O`Qg&vOaL0R>#P$B&{$OB_3@2Jfcj%cezXCx}J9 zu0v)KkSj#*RSy(>aUjUD=6NqlNf=*B*aNDYd$ngd(Dke9bJ(2OHSdV|CtH34XXdj> zI#1U4mcWY832Dc!_O71|sE=kQg!A1`_5h&`G<`gI@k!H$(1R$jx zym({bIiD?H_Zr#L>QFZmOE~gQ@cT+jDCdehQxkNej{MQe)F?8}p zbGdE*`3kwpNB3=oq$YY`z}*C=ZPFg~ortKskkf=ufmDLJ-%Fmf;oS=w6S=c(I7wJq z{QJt$d>U#K-ZF`ZEnK)*WZisMkYo9_*~YwS1PV+3u==^SGUjr>8B1?>u~F+t>(+t^ zbW>3OR^GAXr{|ZtLk5k^fIg$;Mp?m2#@p{NOnrxK-FCfMJ~Y^f!bKlLLTCU+X^6aW z{?fLk-l5Ep5q@N4l$_w%jE4C)bJQPzZ5v#U3YtMT_6k@h)b1dL=Z z;=vi(UzxhDd(TyTcg63mI@bFdAeC%k09W`WXZz%H>Y(1gEXb97ot|H2lKZ}P<%A0# z$tW4Z(;FXI4#fvTR{op}Fpjy_TN(E}?8c)15m6A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%}|*`c8#YE8OW zJtISiIMivLl$s%%mYU4QSyu^GsUpvV{Tf}` z{4RZOTHDh0MMV4Zu`NT|m0U`C!$m)YrNgEcnvx{!#y8{Q>f$pSNs8VP$-0^yzF2n# zaH|%dKa(=`1ub$QVZ)V|g_W?QjG;g5AT!}SPeXdZ#Me2zNN#<^qCv8#{JgcM-uk?U z2w6S)3TJaF=)vXZP!Cs6x4U4&mzE|Bb$5XyFKy9QlZBex(W8T+@sT2xNBC`tKX~PC zuMXoFg%S28iBwJtf3PQOvQ|0WZN!yv@!}9BbrGQ9Uy|?z>ro>p0(BY6&{snW@9k z78uz!sBA4NIfGk(fI5LGsi2}7BNb5{T)W(P$OsO=Oc+B11q6_=>p%sC@Rytc|C%$qDXPo56^osvR97gA3}`o!x)Ss&uS*0_CE5z7iD2aLuA_u*{3o-Hbk%TGr)PLg~$yBBptML9m>%cB-f=LH|78T zgRuR;{zJL6(|HmFh|DReOkn|JTvBxOo!_)=%_@WCPsv)lXM6T#7q9MD^i(TOL? V;m~yz+;SwKs-&e@^~&n~{{W}!hui=F diff --git a/README.md b/README.md index 39e18b5..96eb4aa 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@

- 2024 - 31 ⭐ - Rust + 2024 - 32 ⭐ - Rust

diff --git a/utils/grid/lib.rs b/utils/grid/lib.rs index dab4207..596268e 100644 --- a/utils/grid/lib.rs +++ b/utils/grid/lib.rs @@ -181,6 +181,12 @@ impl Grid { None => None, } } + pub fn get_mut(&mut self, c: &C) -> Option<&mut T> { + match self.valid_pos(c) { + Some(pos) => Some(self.data.get_mut(pos).unwrap()), + None => None, + } + } pub fn set(&mut self, c: &C, mut val: T) -> Option { match self.valid_pos(c) { Some(pos) => {