File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -771,17 +771,19 @@ export class Pigs2Game extends GameBaseSimultaneous {
771771 } ) ;
772772 }
773773 } else if ( ( result . type === "fire" ) && ( result . which === "F" ) ) {
774- const [ fx , fy ] = Pigs2Game . algebraic2coords ( result . from ! ) ;
775- const [ tx , ty ] = Pigs2Game . algebraic2coords ( result . to ! ) ;
776- rep . annotations . push ( {
777- type : "move" ,
778- arrow : true ,
779- style : "dashed" ,
780- targets : [
781- { col : fx , row : fy } ,
782- { col : tx , row : ty }
783- ]
784- } ) ;
774+ if ( result . to !== undefined ) {
775+ const [ fx , fy ] = Pigs2Game . algebraic2coords ( result . from ! ) ;
776+ const [ tx , ty ] = Pigs2Game . algebraic2coords ( result . to ) ;
777+ rep . annotations . push ( {
778+ type : "move" ,
779+ arrow : true ,
780+ style : "dashed" ,
781+ targets : [
782+ { col : fx , row : fy } ,
783+ { col : tx , row : ty }
784+ ]
785+ } ) ;
786+ }
785787 } else if ( result . type === "damage" ) {
786788 const [ x , y ] = Pigs2Game . algebraic2coords ( result . where as string ) ;
787789 rep . annotations . push ( {
You can’t perform that action at this time.
0 commit comments