Skip to content

Commit

Permalink
Update Day22.cls
Browse files Browse the repository at this point in the history
  • Loading branch information
uvg committed Dec 2, 2023
1 parent 85813ed commit daf559b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/AOC2022/Day22.cls
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ ClassMethod Part1(verbose = 0) As %String [ Private ]
set answer=""
set data=..AnalayzeData(.recordsArr,.grid,.rows,.columns)
set lastX=$list(data,1),path=$list(data,2)
if verbose zwrite grid,path,rows,columns,lastX,path write !,$length(path)
if verbose zwrite grid,path,rows,columns,lastX,path write $length(path),!
set lastPos=..MoveOnGrid(.grid,.rows,.columns,path,$list(rows(1),1),1,0)
if verbose zwrite lastPos
set answer=($list(lastPos,1)*1000)+($list(lastPos,2)*4)+$list(lastPos,3)
Expand Down Expand Up @@ -268,7 +268,7 @@ ClassMethod Part2(verbose = 0) As %String [ Private ]
set answer=""
set data=..AnalayzeData(.recordsArr,.grid,.rows,.columns,.cubeType)
set lastX=$list(data,1),path=$list(data,2),size=$list(data,3)
if verbose zwrite grid,path,rows,columns,lastX,path,$length(path),size,cubeType
if verbose zwrite grid,path,rows,columns,lastX,path,size,cubeType write $length(path),!
set lastPos=..MoveOnGrid(.grid,.rows,.columns,path,$list(rows(1),1),1,0,.cubeType)
if verbose zwrite lastPos
set answer=($list(lastPos,1)*1000)+($list(lastPos,2)*4)+$list(lastPos,3)
Expand Down

0 comments on commit daf559b

Please sign in to comment.