- // In hand initially: captain, ninja, samurai + 2 x monk, horse, lance.
- static GenRandInitFen(randomness) {
- const baseFen = ChessRules.GenRandInitFen(Math.min(randomness, 1));
- return (
- baseFen.substr(0, 35) + "3CK3 " +
- "w 0 " + baseFen.substr(48, 2) + " - 111222"
- );
+ // In hand initially: ninja, dragon, 2 x (monk, horse), lance, pawn.
+ static GenRandInitFen(options) {
+ const baseFen = ChessRules.GenRandInitFen(options);
+ const position = baseFen.substr(0, 43)
+ .replace('Q', 'C')
+ .replace(/B/g, '1')
+ .replace(/R/g, 'L')
+ .replace(/N/g, 'H');
+ return position + " w 0 " + baseFen.substr(48, 2) + " - 11211";