File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -13,11 +13,11 @@ IEnumerable<HashSet<Point>> GetFolds(string input) {
13
13
var blocks = input . Split ( "\n \n " ) ;
14
14
// parse points into a hashset
15
15
var points = (
16
- from line in blocks [ 0 ] . Split ( "\n " )
16
+ from line in blocks [ 0 ] . Split ( "\n " )
17
17
let coords = line . Split ( "," )
18
18
select new Point ( int . Parse ( coords [ 0 ] ) , int . Parse ( coords [ 1 ] ) )
19
19
) . ToHashSet ( ) ;
20
-
20
+
21
21
// fold line by line, yielding a new hashset
22
22
foreach ( var line in blocks [ 1 ] . Split ( "\n " ) ) {
23
23
var rule = line . Split ( "=" ) ;
@@ -32,9 +32,8 @@ from line in blocks[0].Split("\n")
32
32
33
33
string ToString ( HashSet < Point > d ) {
34
34
var res = "" ;
35
- for ( var y = 0 ; y < 6 ; y ++ ) {
36
-
37
- for ( var x = 0 ; x < 100 ; x ++ ) {
35
+ for ( var y = 0 ; y < 6 ; y ++ ) {
36
+ for ( var x = 0 ; x < 100 ; x ++ ) {
38
37
res += d . Contains ( new Point ( x , y ) ) ? '#' : ' ' ;
39
38
}
40
39
res += "\n " ;
You can’t perform that action at this time.
0 commit comments