Module cetkaik_naive_representation::relative
source · Expand description
Defines things in terms of relative view: “which piece is opponent’s?”/相対座標ベース。「どの駒が相手の駒?」という話をする
Structs
Describes the board, the 9x9 squares, in terms of relative coordinates.
/盤、つまり、9x9のマス目を、相対座標で表す。
Describes the field, which is defined as a board plus each side’s hop1zuo1.
/フィールドを表す。フィールドとは、盤に両者の手駒を加えたものである。
Describes a piece that is not a Tam2 and points downward (i.e. opponents).
/駒のうち、皇ではなくて、下向き(つまり相手陣営)のものを表す。
Describes a piece that is not a Tam2 and points upward (i.e. yours).
/駒のうち、皇ではなくて、上向き(つまり自分陣営)のものを表す。
Enums
Describes a piece on the board.
/盤上に存在できる駒を表現する。
Describes a move denoted in absolute coordinates.
/絶対座標で書かれた指し手を表す。
Describes which player it is
/どちら側のプレイヤーであるかを指定する。
Functions
Calculates the distance between two points.
The distance is defined as the larger of the difference between either the x or y coordinates.
/2点間の距離(x座標の差およびy座標の差のうち小さくない方)を計算する。
Checks if the square is a tam2 nua2 (tam2’s water), entry to which is restricted.
/マスが皇水(たむぬあ)であるかどうかの判定
Rotates a board.
/盤を180度回転させ、自分陣営と相手陣営を入れ替える。
Rotates the coordinate with the center of the board as the center of rotation.
/盤の中心を基準に、座標を180度回転させる。
Returns the initial configuration as specified in the y1 huap1 (the standardized rule).
The black king points upward (i.e. you)
/官定で定められた初期配置を与える。黒王が自分側にある。
Returns the initial configuration as specified in the y1 huap1 (the standardized rule).
The red king points upward (i.e. you)
/官定で定められた初期配置を与える。赤王が自分側にある。