@@ -8,10 +8,10 @@ namespace AdventOfCode.Y2021.Day22;
8
8
[ ProblemName ( "Reactor Reboot" ) ]
9
9
class Solution : Solver {
10
10
11
- public object PartOne ( string input ) => NumberOfActiveCubesInRange ( input , 50 ) ;
12
- public object PartTwo ( string input ) => NumberOfActiveCubesInRange ( input , int . MaxValue ) ;
11
+ public object PartOne ( string input ) => ActiveCubesInRange ( input , 50 ) ;
12
+ public object PartTwo ( string input ) => ActiveCubesInRange ( input , int . MaxValue ) ;
13
13
14
- public long NumberOfActiveCubesInRange ( string input , int size ) {
14
+ public long ActiveCubesInRange ( string input , int range ) {
15
15
var cmds = Parse ( input ) ;
16
16
17
17
// Recursive approach
@@ -36,9 +36,9 @@ long activeCubesAfterIcmd(int icmd, Region region) {
36
36
return activeCubesAfterIcmd (
37
37
cmds . Length - 1 ,
38
38
new Region (
39
- new Segment ( - size , size ) ,
40
- new Segment ( - size , size ) ,
41
- new Segment ( - size , size ) ) ) ;
39
+ new Segment ( - range , range ) ,
40
+ new Segment ( - range , range ) ,
41
+ new Segment ( - range , range ) ) ) ;
42
42
}
43
43
44
44
Cmd [ ] Parse ( string input ) {
0 commit comments