Save the coordinates of the given vertices of the rectangle
if ( s [ i ] [ j ] == ' ' ) { if ( row . has ( i ) ) row . set ( i , row . get ( i ) + 1 ) else row . set ( i , 1 ) if ( col . has ( j ) ) col . set ( j , col . get ( j ) + 1 ) else col . set ( j , 1 ) } var x , y ; row . forEach ( ( value , key ) => { if ( value == 1 ) x = key ; } ) ; col . forEach ( ( value , key ) => { if ( value == 1 ) y = key ; } ) ;