@@ -182,6 +182,7 @@ export class JacynthGame extends GameBase {
182182 }
183183
184184 const state = this . stack [ idx ] ;
185+ this . results = [ ...state . _results ] ;
185186 this . currplayer = state . currplayer ;
186187 this . board = new Map ( state . board ) ;
187188 this . claimed = new Map ( state . claimed ) ;
@@ -714,12 +715,19 @@ export class JacynthGame extends GameBase {
714715 } ;
715716
716717 // Add annotations
717- if ( this . stack [ this . stack . length - 1 ] . _results . length > 0 ) {
718+ if ( this . results . length > 0 ) {
718719 rep . annotations = [ ] ;
719- for ( const move of this . stack [ this . stack . length - 1 ] . _results ) {
720- if ( move . type === "place" || move . type === "claim" ) {
720+ for ( const move of this . results ) {
721+ if ( move . type === "place" ) {
722+ // only add if there's not a claim for the same cell
723+ const found = this . results . find ( r => r . type === "claim" && r . where === move . where ) ;
724+ if ( found === undefined ) {
725+ const [ x , y ] = JacynthGame . algebraic2coords ( move . where ! ) ;
726+ rep . annotations . push ( { type : "enter" , occlude : false , targets : [ { row : y , col : x } ] } ) ;
727+ }
728+ } else if ( move . type === "claim" ) {
721729 const [ x , y ] = JacynthGame . algebraic2coords ( move . where ! ) ;
722- rep . annotations . push ( { type : "enter" , occlude : false , targets : [ { row : y , col : x } ] } ) ;
730+ rep . annotations . push ( { type : "enter" , occlude : false , dashed : [ 4 , 8 ] , targets : [ { row : y , col : x } ] } ) ;
723731 }
724732 }
725733 }
0 commit comments