@@ -61,7 +61,7 @@ export class CifraGame extends GameBase {
6161 { uid : "sum" , group : "mode" } ,
6262 ] ,
6363 categories : [ "goal>royal-capture" , "goal>royal-escape" , "goal>score>eog" , "mechanic>place" , "mechanic>move" , "mechanic>capture" , "mechanic>random>setup" , "board>shape>rect" , "board>connect>rect" , "components>special" ] ,
64- flags : [ "experimental" , "automove" , "custom-buttons" , "custom-colours" , "scores" ]
64+ flags : [ "experimental" , "automove" , "custom-buttons" , "custom-colours" , "scores" , "custom-randomization" ]
6565 } ;
6666
6767 public numplayers = 2 ;
@@ -176,7 +176,7 @@ export class CifraGame extends GameBase {
176176 }
177177 if ( ray . length > 0 ) {
178178 // if last cell is friendly occupied or locked, lop it off
179- if ( allMine . includes ( ray [ ray . length - 1 ] ) || ray [ ray . length - 1 ] . endsWith ( myHome ) ) {
179+ if ( allMine . includes ( ray [ ray . length - 1 ] ) || ( this . board . has ( ray [ ray . length - 1 ] ) && ray [ ray . length - 1 ] . endsWith ( myHome ) ) ) {
180180 ray = ray . slice ( 0 , - 1 ) ;
181181 }
182182 // each surviving cell is a valid move target
@@ -200,7 +200,7 @@ export class CifraGame extends GameBase {
200200 { label : "cifra.lt" , move : "light,top" } ,
201201 { label : "cifra.lb" , move : "light,bottom" } ,
202202 { label : "cifra.dt" , move : "dark,top" } ,
203- { label : "cifra.db" , move : "dark. bottom" } ,
203+ { label : "cifra.db" , move : "dark, bottom" } ,
204204 ] ;
205205 }
206206 return [ ] ;
0 commit comments