31
loading...
This website collects cookies to deliver better user experience
[x,y]
, where x
and y
are considered 'regular numbers.' Some examples of these 'numbers,' one per line:[1,2]
[[1,2],3]
[9,[8,7]]
[[1,9],[8,5]]
[[[[1,2],[3,4]],[[5,6],[7,8]]],9]
[[[9,[3,8]],[[0,9],6]],[[[3,7],[4,9]],3]]
[[[[1,3],[5,3]],[[1,3],[8,7]]],[[[4,9],[6,9]],[[8,2],[7,3]]]]
[
and ]
). However, performing operations on the regular numbers required type conversions into integers, as well as a number of checks to make sure two-digit numbers were parsed when necessary. There were also some nasty edge cases, like performing an operation on one particular string but leaving a matching string earlier or later in the sequence alone.x
was another scanner's y
or z
), and also accounting for which direction a scanner faced on each of it's axes relative to those of it's parent.x
, y
, and z
coordinate with those of every beacon from another scanner. The number of times a particular sum or difference showed up determined whether or not there were shared beacons between the two scanners, and my dictionary setup gave me enough information to determine a child scanner's position relative to its parent.[[2, -1], [0, 1], [1, -1]]
x
, y
, and z
coordinates of a beacon, and the values in each pair represented which parent axis that coordinate transformed to, and what orientation conversion to apply. For the 'matrix' above, a child beacon's x
coordinate is on the parent's z
axis, and the child scanner is facing away from the parent scanner on that axis.