@@ -48,7 +48,7 @@ const SAN = {
4848 CAPTURE : "x" ,
4949 CHECK : "+" ,
5050 CHECKMATE : "#"
51- }
51+ } ;
5252const Action = {
5353 MOVE : 1 ,
5454 PLAYER_CAPTURE : 2 ,
@@ -611,7 +611,7 @@ class Chess {
611611 this . moves -- ;
612612 this . turn ( { change : true } ) ;
613613
614- const [ from , to ] = [ this . get ( { square :`${ move . from . file } ${ move . from . rank } ` } ) , this . get ( { square :`${ move . to . file } ${ move . to . rank } ` } ) ]
614+ const [ from , to ] = [ this . get ( { square :`${ move . from . file } ${ move . from . rank } ` } ) , this . get ( { square :`${ move . to . file } ${ move . to . rank } ` } ) ] ;
615615
616616 this . get ( { square :`${ move . from . file } ${ move . from . rank } ` } ) . piece = to . piece ;
617617
@@ -656,7 +656,7 @@ class Chess {
656656
657657 // return a copy of the board
658658 copy ( ) {
659- return this . _board . map ( r => r . slice ( ) . map ( f => Object . assign ( Object . create ( Object . getPrototypeOf ( f ) ) , f ) ) ) ;
659+ return this . _board . map ( r => r . slice ( ) . map ( f => Object . assign ( Object . create ( Object . getPrototypeOf ( f ) ) , f ) ) ) ;
660660 }
661661
662662 // returns true if a square exists, else false
@@ -732,7 +732,7 @@ class Chess {
732732 else if ( ambiguous . filter ( a => a . rank === from . rank ) . length === 0 )
733733 fromCoord = from . rank ;
734734 else
735- fromCoord = `${ from . file } ${ from . rank } `
735+ fromCoord = `${ from . file } ${ from . rank } ` ;
736736 }
737737
738738 if ( this . _move ( from , to ) === Action . INVALID_ACTION )
@@ -741,10 +741,10 @@ class Chess {
741741 if ( this . checkmate ( ) . white || this . checkmate ( ) . black )
742742 check = "#" ;
743743 else if ( this . check ( ) . length > 0 )
744- check = "+"
744+ check = "+" ;
745745 this . undo ( ) ;
746746
747- return `${ pieceName } ${ fromCoord } ${ capture } ${ to . file } ${ to . rank } ${ check } `
747+ return `${ pieceName } ${ fromCoord } ${ capture } ${ to . file } ${ to . rank } ${ check } ` ;
748748 }
749749}
750750
0 commit comments