File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,13 @@ const isPrintable = function (targetGrid) {
13
13
for ( let j = 0 ; j < n ; j ++ ) {
14
14
let c = targetGrid [ i ] [ j ]
15
15
colorSet . add ( c )
16
- posMin [ c ] [ 0 ] = Math . min ( posMin [ c ] [ 0 ] , i ) // Up
17
- posMin [ c ] [ 1 ] = Math . min ( posMin [ c ] [ 1 ] , j ) // Left
18
- posMax [ c ] [ 0 ] = Math . max ( posMax [ c ] [ 0 ] , i ) // Down
19
- posMax [ c ] [ 1 ] = Math . max ( posMax [ c ] [ 1 ] , j ) // Right
16
+ posMin [ c ] [ 0 ] = Math . min ( posMin [ c ] [ 0 ] , i ) //Up
17
+ posMin [ c ] [ 1 ] = Math . min ( posMin [ c ] [ 1 ] , j ) //Left
18
+ posMax [ c ] [ 0 ] = Math . max ( posMax [ c ] [ 0 ] , i ) //Down
19
+ posMax [ c ] [ 1 ] = Math . max ( posMax [ c ] [ 1 ] , j ) //Right
20
20
}
21
21
}
22
- while ( colorSet . size > 0 ) {
22
+ while ( colorSet . size ) {
23
23
const tmp = new Set ( )
24
24
for ( let color of colorSet ) {
25
25
if ( ! isRect ( targetGrid , color ) ) {
@@ -45,6 +45,7 @@ const isPrintable = function (targetGrid) {
45
45
A [ i ] [ j ] = 0
46
46
}
47
47
}
48
+
48
49
return true
49
50
}
50
51
}
You can’t perform that action at this time.
0 commit comments