translate: Translate move list to other notation systems

View source: R/translate.R

translateR Documentation

Translate move list to other notation systems

Description

[Experimental]

#'

1 pawn 兵 卒 P
2 canon C
3 rook R
4 horse H
5 elephant 相 象 E
5 advisor 仕 士 A
5 general 帅 将 K

Usage

translate(moves, target = "auto", pos = "startpos")

Arguments

moves

chr vec of n elements equal to n moves

target

one of c("san", "lan")

pos

list of length 90. See position_move to generate positions.

Value

chr vec of parsed notation, length 1.

Examples

san <- c("炮二进二", "炮2进7", "炮八平二", "3进1")
lan <- c("h2h4", "b7b0", "b2h2", "f9e8")

translate(lan)
translate(san, input_type = "san")

D-Se/xiangqi documentation built on May 12, 2022, 6:06 a.m.